/* 개인정보 정책 페이지 전용 스타일 */

/* 브랜드 컬러 변수 정의 */
:root {
    --brand-blue: #4185f4;
    --brand-green: #0dc189;
    --brand-yellow: #f3ed7b;
    --brand-black: #0d0d0d;
    --brand-light-gray: #f2f2f2;
    --text-primary: #0d0d0d;
    --text-secondary: #666666;
    --text-light: #888888;
}

* {
    box-sizing: border-box;
}

/* 기본 body 스타일 확장 */
body {
    padding-top: 64px; /* 헤더 높이만큼 패딩 추가 */
}

/* 헤더 스타일 확장 (privacy.html에서 사용하는 클래스명) */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* 기존 style.css와 호환성을 위한 추가 스타일 */
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo img {
    height: 28px;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #111;
}

.auth-buttons .btn {
    background: var(--brand-blue);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-buttons .btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
}

/* 모바일 메뉴 스타일 */
.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 1000;
}

.mobile-nav-overlay.active {
    display: flex;
    flex-direction: column;
}

.mobile-nav {
    background: #2c3e50;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
}

.mobile-nav a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
}

.mobile-nav .btn {
    background: var(--brand-blue);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-align: center;
    margin-top: 16px;
}

/* 컨테이너 */
.privacy-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 48px;
    min-height: calc(100vh - 200px);
    background: #ffffff;
}

/* 헤더 */
.privacy-header {
    text-align: center;
    margin-bottom: 64px;
}

.privacy-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.privacy-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 8px;
}

/* 단계별 선택 섹션 */
.selection-steps {
    margin-bottom: 48px;
}

/* 단계 헤더 */
.step-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
    color: white;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(65, 133, 244, 0.3);
}

.step-header h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* 뒤로가기 버튼 */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--brand-light-gray);
    border-radius: 24px;
    color: var(--brand-blue);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
    box-shadow: 0 2px 8px rgba(65, 133, 244, 0.2);
}

/* Step 1: 상품 카드 */
.product-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 600px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border: 2px solid var(--brand-light-gray);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand-blue), var(--brand-green), transparent);
    transition: left 0.5s ease;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    border-color: var(--brand-blue);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(65, 133, 244, 0.15);
}

.product-card.selected {
    border-color: var(--brand-blue);
    background: linear-gradient(135deg, rgba(65, 133, 244, 0.05), rgba(13, 193, 137, 0.05));
    box-shadow: 0 4px 16px rgba(65, 133, 244, 0.1);
}

.product-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 12px rgba(65, 133, 244, 0.3);
}

.product-card h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.product-card p {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.6;
}

.product-card:not([data-product="textway-api"]):not([data-product="tb-mini"]) {
    pointer-events: none; /* 클릭 이벤트 비활성화 */
    filter: grayscale(100%); /* 흑백 처리 */
    opacity: 0.6; /* 시각적으로 비활성화된 느낌 추가 */
    cursor: not-allowed; /* 마우스 커서 변경 */
}

/* Step 2: 약관 종류 카드 */
.policy-type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.policy-type-card {
    background: white;
    border: 2px solid var(--brand-light-gray);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.policy-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--brand-green), var(--brand-yellow), transparent);
    transition: left 0.5s ease;
}

.policy-type-card:hover::before {
    left: 100%;
}

.policy-type-card:hover {
    border-color: var(--brand-green);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(13, 193, 137, 0.15);
}

.policy-type-card.selected {
    border-color: var(--brand-green);
    background: linear-gradient(135deg, rgba(13, 193, 137, 0.05), rgba(243, 237, 123, 0.05));
    box-shadow: 0 4px 16px rgba(13, 193, 137, 0.1);
}

.policy-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--brand-green), var(--brand-yellow));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--brand-black);
    box-shadow: 0 4px 12px rgba(13, 193, 137, 0.3);
}

.policy-type-card h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.policy-type-card p {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.6;
}

/* Step 3: 버전 선택 */
.version-selector {
    max-width: 800px;
    margin: 0 auto;
}

.version-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.version-item {
    background: white;
    border: 2px solid var(--brand-light-gray);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.version-item:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 4px 16px rgba(65, 133, 244, 0.1);
}

.version-item.selected {
    border-color: var(--brand-blue);
    background: linear-gradient(135deg, rgba(65, 133, 244, 0.05), rgba(13, 193, 137, 0.05));
}

.version-item.current {
    border-color: var(--brand-green);
    background: linear-gradient(135deg, rgba(13, 193, 137, 0.08), rgba(243, 237, 123, 0.08));
}

.version-item.current::after {
    content: 'CURRENT';
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(45deg, var(--brand-green), var(--brand-yellow));
    color: var(--brand-black);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.version-date {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.version-status {
    font-size: 14px;
    color: var(--brand-blue);
    font-weight: 500;
    margin-bottom: 16px;
}

.version-item.current .version-status {
    color: var(--brand-green);
}

.version-changes {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--brand-light-gray);
}

.version-item:hover .version-changes,
.version-item.selected .version-changes {
    display: block;
}

.version-changes ul {
    margin: 0;
    padding-left: 20px;
}

.version-changes li {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 8px;
    line-height: 1.5;
}

.version-changes li::marker {
    color: var(--brand-blue);
}

/* Step 4: 약관 내용 */
.policy-info {
    margin-bottom: 24px;
    padding: 16px 24px;
    background: var(--brand-light-gray);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    border-left: 4px solid var(--brand-blue);
}

.policy-search {
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.policy-search input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 20px;
    border: 2px solid var(--brand-light-gray);
    border-radius: 22px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
    background: white;
}

.policy-search input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(65, 133, 244, 0.1);
}

.policy-search button {
    position: absolute;
    right: 2px;
    top: 2px;
    transform: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.2s ease;
}

.policy-search button:hover {
    color: var(--brand-blue);
    background-color: rgba(65, 133, 244, 0.1);
    border-radius: 50%;
}

.search-result-message {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-light);
}

/* 검색 옵션 스타일 */
.search-option {
    margin-top: 10px;
    font-size: 14px;
}

.search-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.search-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 약관 콘텐츠 */
.policy-content {
    background: white;
    border-radius: 12px;
    padding: 48px;
    line-height: 1.8;
    max-width: none;
    margin: 0;
    border: 1px solid var(--brand-light-gray);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.policy-content h2 {
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 48px 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-light-gray);
    position: relative;
}

.policy-content h2:first-child {
    margin-top: 0;
}

.policy-content h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-green));
}

.policy-content h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 32px 0 16px 0;
}

.policy-content p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-weight: 300;
}

.policy-content ul,
.policy-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.policy-content li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-weight: 300;
}

.policy-content li::marker {
    color: var(--brand-blue);
}

.policy-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.policy-content th {
    background: var(--brand-light-gray);
    color: var(--text-primary);
    font-weight: 500;
    padding: 12px;
    border: 1px solid #ddd;
}

.policy-content td {
    padding: 12px;
    border: 1px solid #ddd;
    color: var(--text-secondary);
}

/* 검색 하이라이트 */
.highlight-match {
    background-color: rgba(255, 235, 59, 0.5);
    padding: 2px 0;
    border-radius: 2px;
}

.highlight-match:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.8);
}

/* Smooth transitions for language changes */
#policy-content {
    transition: opacity 0.3s ease;
}

#policy-content.loading {
    opacity: 0.6;
}

/* 푸터 스타일 */
footer {
    background: #2c3e50;
    color: white;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 32px;
    display: grid;
    grid-template-columns: 1fr 2fr 200px;
    gap: 48px;
    align-items: start;
}

.footer-logo img {
    height: 32px;
    filter: brightness(0) invert(1);
}

.footer-social {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.footer-social a {
    color: #7a8b9a;
    font-size: 18px;
    transition: color 0.2s ease;
}

.footer-social a:hover {
    color: white;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-group h3 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-group a {
    display: block;
    color: #7a8b9a;
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 8px;
    transition: color 0.2s ease;
    font-weight: 300;
}

.footer-group a:hover {
    color: white;
}

.footer-lang select {
    background: #34495e;
    color: white;
    border: 1px solid #4a5f7a;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.footer-copyright {
    text-align: center;
    padding: 24px;
    border-top: 1px solid #34495e;
    color: #7a8b9a;
    font-size: 13px;
    font-weight: 300;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-container {
        padding: 0 20px;
    }

    .privacy-container {
        padding: 48px 20px;
    }

    .privacy-header h1 {
        font-size: 2rem;
    }

    .step-header h2 {
        font-size: 1.5rem;
    }

    .product-cards {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 0 20px;
    }

    .policy-type-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .policy-content {
        padding: 32px 24px;
    }

    .policy-search {
        margin-bottom: 24px;
    }

    .version-item {
        padding: 20px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .privacy-header h1 {
        font-size: 1.8rem;
    }

    .step-header h2 {
        font-size: 1.3rem;
    }

    .product-cards {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 12px;
    }

    .product-card,
    .policy-type-card {
        padding: 24px 20px;
    }

    .policy-content {
        padding: 24px 20px;
    }
}