/* ==================== */
/* Privacy Header Styles */
/* 테마 시스템 통합 및 반응형 디자인 (PC, 태블릿, 모바일) */
/* ==================== */

/* ==================== */
/* CSS Variables */
/* ==================== */
:root {
     
    --header-height: 70px;
    --header-height-mobile: 60px;
    --max-width: 1200px;
    
    --max-width-narrow: 900px;
    --content-padding: var(--spacing-xl);
    
    /* Line Heights - 가독성 최적화 */
    --line-height-tight: 1.3;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.8;
}

/* ==================== */
/* Header Base Styles */
/* ==================== */
.header.privacy-header {
    background: var(--color-primary);
    height: var(--header-height);
    padding: var(--spacing-md) 72px;
    border-bottom-left-radius: 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-normal), box-shadow var(--transition-normal);
}

/* 다크 테마에서 헤더 스타일 유지 (브랜드 색상) */
[data-theme="dark"] .header.privacy-header {
    background: var(--color-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    justify-content: space-between;
}

/* ==================== */
/* Back Button Styles */
/* ==================== */
.btn-back {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

/* 뒤로가기 버튼 호버 효과 - UX 기준: 명확한 피드백 */
.btn-back::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width var(--transition-slow), height var(--transition-slow);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

.btn-back:hover::before {
    width: 100%;
    height: 100%;
}

.btn-back:active {
    transform: translateX(-4px) scale(0.95);
    transition: transform var(--transition-fast);
}

.btn-back:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.btn-back svg {
    width: 24px;
    height: 24px;
    transition: transform var(--transition-normal);
    position: relative;
    z-index: 1;
}

.btn-back:hover svg {
    transform: translateX(-2px);
}

/* ==================== */
/* Page Title Styles */
/* ==================== */
.page-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-white);
    margin: 0;
    flex: 1;
    text-align: center;
    letter-spacing: -0.01em;
    transition: font-size var(--transition-normal);
}

/* ==================== */
/* 우측 액션 버튼 그룹 */
/* ==================== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ==================== */
/* 테마 토글 버튼 */
/* ==================== */
.privacy-header .theme-toggle {
    position: relative;
    width: 48px;
    height: 24px;
    min-width: 48px;
    min-height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    padding: 2px;
}

.privacy-header .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.privacy-header .theme-toggle::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-white);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .privacy-header .theme-toggle::before {
    transform: translateX(24px);
    background: #FFD700;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.privacy-header .theme-toggle-icon {
    position: absolute;
    width: 16px;
    height: 16px;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.privacy-header .theme-toggle-icon.sun {
    left: 4px;
    opacity: 1;
}

.privacy-header .theme-toggle-icon.moon {
    right: 4px;
    opacity: 0;
}

[data-theme="dark"] .privacy-header .theme-toggle-icon.sun {
    opacity: 0;
}

[data-theme="dark"] .privacy-header .theme-toggle-icon.moon {
    opacity: 1;
}

.privacy-header .theme-toggle-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--color-white);
    stroke: var(--color-white);
}

/* ==================== */
/* 메인으로 가기 버튼 */
/* ==================== */
.btn-home {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
    transition: var(--transition-normal);
    text-decoration: none;
    position: relative;
}

.btn-home:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-home:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.15);
}

.btn-home svg {
    width: 24px;
    height: 24px;
    transition: var(--transition-normal);
}

.btn-home:hover svg {
    transform: scale(1.1);
}

/* ==================== */
/* 반응형 디자인 - 태블릿 (1024px 이하) */
/* ==================== */
@media (max-width: 1024px) {
    .header.privacy-header {
        padding: var(--spacing-md) var(--spacing-2xl);
    }
    
    .header-container {
        gap: var(--spacing-sm);
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .header-actions {
        gap: 6px;
    }
}

/* ==================== */
/* 반응형 디자인 - 태블릿 (768px 이하) */
/* ==================== */
@media (max-width: 768px) {
    .header.privacy-header {
        height: var(--header-height-mobile);
        padding: var(--spacing-md) var(--spacing-lg);
        border-bottom-left-radius: 34px;
    }
    
    .header-container {
        gap: var(--spacing-sm);
    }
    
    .btn-back {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .btn-back svg {
        width: 20px;
        height: 20px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .header-actions {
        gap: 6px;
    }
    
    .privacy-header .theme-toggle {
        width: 40px;
        height: 20px;
        min-width: 40px;
        min-height: 20px;
    }
    
    .privacy-header .theme-toggle::before {
        width: 16px;
        height: 16px;
    }
    
    [data-theme="dark"] .privacy-header .theme-toggle::before {
        transform: translateX(20px);
    }
    
    .privacy-header .theme-toggle-icon {
        width: 14px;
        height: 14px;
    }
    
    .btn-home {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .btn-home svg {
        width: 20px;
        height: 20px;
    }
}

/* ==================== */
/* 반응형 디자인 - 모바일 (480px 이하) */
/* ==================== */
@media (max-width: 480px) {
    .header.privacy-header {
        height: var(--header-height-mobile);
        padding: var(--spacing-sm) var(--spacing-md);
        border-bottom-left-radius: 24px;
    }
    
    .header-container {
        gap: var(--spacing-xs);
    }
    
    .btn-back {
        width: 32px;
        height: 32px;
        min-width: 32px;
        border-radius: 6px;
    }
    
    .btn-back svg {
        width: 18px;
        height: 18px;
    }
    
    .page-title {
        font-size: 16px;
        font-weight: 600;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .privacy-header .theme-toggle {
        width: 36px;
        height: 18px;
        min-width: 36px;
        min-height: 18px;
    }
    
    .privacy-header .theme-toggle::before {
        width: 14px;
        height: 14px;
    }
    
    [data-theme="dark"] .privacy-header .theme-toggle::before {
        transform: translateX(18px);
    }
    
    .privacy-header .theme-toggle-icon {
        width: 12px;
        height: 12px;
    }
    
    .btn-home {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    
    .btn-home svg {
        width: 18px;
        height: 18px;
    }
}

/* ==================== */
/* 접근성 개선 */
/* ==================== */
/* 애니메이션 감소 선호 사용자 */
@media (prefers-reduced-motion: reduce) {
    .btn-back,
    .btn-back::before,
    .btn-back svg {
        transition: none !important;
    }
    
    .btn-back:hover {
        transform: none;
    }
    
    .btn-back:active {
        transform: scale(0.95);
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .btn-back {
        border: 2px solid var(--color-white);
    }
    
    .btn-back:focus {
        outline: 3px solid var(--color-white);
        outline-offset: 3px;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .btn-back {
        min-width: 44px;
        min-height: 44px;
    }
    
    .btn-back:hover {
        transform: none;
    }
    
    .btn-back:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.3);
    }
}

