/**
 * 컴포넌트 스타일 - 버튼, 토글, 범례, 툴팁, 상태
 */

/* 토글 버튼 */
.toggle-buttons {
    display: flex;
    background: rgba(255,255,255,0.6);
    border-radius: 10px;
    padding: 3px;
    border: 1.5px solid var(--border-color);
    gap: 2px;
}

.toggle-btn {
    flex: 1;
    padding: 8px 18px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.toggle-btn:hover:not(.active) {
    color: var(--text-secondary);
    background: rgba(102, 126, 234, 0.07);
}

.toggle-btn.active {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.28);
}

/* 버튼 */
.btn {
    padding: 14px 36px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 범례 */
.legend {
    display: flex;
    gap: 28px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    font-size: 13px;
    justify-content: center;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-primary);
    border-radius: 20px;
    transition: all var(--transition-normal);
}

.legend-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.legend-color.am {
    background: #3b82f6;
}

.legend-color.pm {
    background: #f59e0b;
}

.legend-color.holiday {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.legend-color.off {
    background: #94a3b8;
}

/* 로딩 상태 */
.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 24px;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    opacity: 0.4;
    stroke: var(--primary-color);
}

.empty-state p {
    font-size: 16px;
    font-weight: 500;
}

/* 에러 메시지 */
.error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 이벤트 툴팁 */
.event-tooltip {
    position: absolute;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 20px;
    z-index: 1000;
    min-width: 240px;
    max-width: 320px;
    display: none;
    border: 1px solid var(--border-color);
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-tooltip.show {
    display: block;
}

.event-tooltip h4 {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.event-tooltip p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-tooltip .badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-tooltip .badge.am {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.event-tooltip .badge.pm {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* Period badges */
.period-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    min-width: 44px;
    text-align: center;
    text-transform: uppercase;
}

.period-badge.am {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.period-badge.pm {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
