/* 元件專用樣式 */

/* 日曆元件 */
.calendar-view {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    min-height: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-day:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
}

.calendar-day.today {
    border: 2px solid var(--primary-color);
    background-color: #dbeafe;
}

.calendar-event {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    margin-top: 5px;
    font-size: 12px;
}

/* 電台卡片 */
.station-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.station-card:hover {
    transform: translateY(-5px);
}

.station-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
}

/* 時段選擇器 */
.timeslot-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.timeslot-option {
    padding: 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeslot-option:hover {
    border-color: var(--primary-color);
    background-color: #dbeafe;
}

.timeslot-option.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.timeslot-option.occupied {
    background-color: #fee2e2;
    border-color: var(--danger-color);
    cursor: not-allowed;
    opacity: 0.6;
}

/* 通話監控面板 */
.call-monitor {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.call-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.3s ease;
}

.call-item:hover {
    background-color: #f3f4f6;
}

.call-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.call-status.active {
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

.call-status.waiting {
    background-color: var(--warning-color);
}

.call-status.ended {
    background-color: #9ca3af;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 進度環 */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease;
}

/* 圖表容器 */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* 資料卡片網格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 狀態指示器 */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.status-indicator.broadcasting {
    background-color: #dcfce7;
    color: #166534;
}

.status-indicator.scheduled {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-indicator.completed {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* 搜尋框 */
.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* 標籤頁 */
.tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
}

.tab-item {
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #6b7280;
}

.tab-item:hover {
    color: var(--primary-color);
}

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* 時間軸 */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* 切換開關 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider::before {
    transform: translateX(26px);
}

/* 載入骨架屏 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-card {
    height: 200px;
}