/* Documentation Page Styles - Based on Sumsub Design */

.documentation-main {
    min-height: 100vh;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'proxima-nova', Roboto, sans-serif;
    padding: 100px 0
}

.documentation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-title {
    font-size: 50px;
    font-weight: 650;
    color: #333333;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.01em;
}

/* Search Section */
.search-section {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 48px 12px 48px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.2s ease;
    outline: none;
}

.search-input:focus {
    border-color: #377CF7;
    box-shadow: 0 0 0 3px rgba(55, 124, 247, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.search-clear:hover {
    background-color: #f1f3f4;
}

/* Documentation Table */
.documentation-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 24px;
    gap: 24px;
}

.header-col {
    font-size: 14px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    border-bottom: 1px solid #f1f3f4;
    padding: 24px;
    transition: background-color 0.2s ease;
    gap: 24px;
    align-items: flex-start;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover:not(.country-placeholder):not(.country-placeholder-bottom) {
    background-color: #fafbfc;
}

/* Country Column */
.country-col {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 500;
    color: #333333;
    gap: 12px;
}

.flag-icon {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Guides Column */
.guides-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.pdf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.pdf-icon svg {
    width: 24px;
    height: 24px;
}

.guide-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.guide-text-link {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    color: #377CF7;
    text-decoration: none;
    line-height: 1.4;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.guide-text-link:hover {
    color: #2563EB;
    border-bottom-color: #2563EB;
}

/* Mobile Section Titles (hidden by default) */
.mobile-section-title {
    display: none;
    font-size: 12px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Placeholder Styles */
.country-placeholder,
.country-placeholder-bottom {
    cursor: pointer;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #e9ecef;
}

.country-placeholder:hover,
.country-placeholder-bottom:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.placeholder-col {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 500;
    color: #666666;
    width: 100%;
}

.placeholder-text {
    color: #666666;
}

.placeholder-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.placeholder-arrow-up {
    transform: rotate(180deg);
}

.placeholder-content {
    display: flex;
    align-items: center;
}

.placeholder-simple {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #666666;
}

.placeholder-count {
    font-weight: 500;
}

.placeholder-action {
    color: #999999;
}

/* Hidden countries */
.country-hidden {
    display: none !important;
}

.country-visible {
    display: grid !important;
}

/* ===== DARK THEME ===== */

/* CSS Variables for theming */
:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fafbfc;
    --bg-placeholder: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --bg-placeholder-hover: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    --bg-placeholder-arrow: rgba(255, 255, 255, 0.5);
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-placeholder: #666666;
    --border-color: #e9ecef;
    --border-light: #f1f3f4;
    --accent-color: #377CF7;
    --accent-hover: #2563EB;
    --shadow: rgba(0, 0, 0, 0.05);
    --search-icon-color: #AAAAAA;
    --pdf-bg: rgba(220, 38, 38, 0.1);
    --pdf-stroke: #DC2626;
}

/* Dark theme variables */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #242424;
    --bg-placeholder: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    --bg-placeholder-hover: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
    --bg-placeholder-arrow: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --text-placeholder: #b3b3b3;
    --border-color: #3a3a3a;
    --border-light: #404040;
    --accent-color: #4a90ff;
    --accent-hover: #5ba3ff;
    --shadow: rgba(0, 0, 0, 0.3);
    --search-icon-color: #808080;
    --pdf-bg: rgba(239, 68, 68, 0.2);
    --pdf-stroke: #ef4444;
}

/* Apply theme variables to existing styles */
.documentation-main {
    background-color: var(--bg-primary);
}

.page-title {
    color: var(--text-primary);
}

.search-input {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(55, 124, 247, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-icon svg path {
    stroke: var(--search-icon-color);
}

.search-clear svg path {
    stroke: var(--search-icon-color);
}

.search-clear:hover {
    background-color: var(--bg-tertiary);
}

.documentation-table {
    background: var(--bg-secondary);
    box-shadow: 0 2px 12px var(--shadow);
}

.table-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.header-col {
    color: var(--text-secondary);
}

.table-row {
    border-bottom: 1px solid var(--border-light);
}

.table-row:hover:not(.country-placeholder):not(.country-placeholder-bottom) {
    background-color: var(--bg-tertiary);
}

.country-col {
    color: var(--text-primary);
}

.pdf-icon {
    background: var(--pdf-bg);
}

.pdf-icon svg path {
    stroke: var(--pdf-stroke);
}

.guide-text-link {
    color: var(--accent-color);
}

.guide-text-link:hover {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

.mobile-section-title {
    color: var(--text-secondary);
}

.country-placeholder,
.country-placeholder-bottom {
    background: var(--bg-placeholder);
    border: 1px solid var(--border-color);
}

.country-placeholder:hover,
.country-placeholder-bottom:hover {
    background: var(--bg-placeholder-hover);
}

.placeholder-text {
    color: var(--text-placeholder);
}

.placeholder-count {
    color: var(--text-placeholder);
}

.placeholder-action {
    color: var(--text-muted);
}

.placeholder-arrow {
    background: var(--bg-placeholder-arrow);
}

.placeholder-arrow svg path {
    stroke: var(--text-secondary);
}


/* Responsive Design */

/* Large Desktop: 1440px+ */
@media (min-width: 1440px) {
    .documentation-container {
        max-width: 1100px;
        padding: 0 40px;
    }
    
    .page-title {
        font-size: 56px;
        margin-bottom: 70px;
    }
    
    .table-header, .table-row {
        padding: 28px 32px;
        gap: 32px;
        place-items: center;
    }
}

/* Desktop: 1024px - 1439px */
@media (max-width: 1439px) and (min-width: 1024px) {
    .documentation-container {
        max-width: 800px;
        padding: 0 30px;
    }
    
    .page-title {
        font-size: 48px;
    }
    
    .guide-links {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .guide-link {
        width: fit-content;
    }
    .table-header, .table-row {
        place-items: center;
    }
}

/* Tablet: 768px - 1023px */
@media (max-width: 1023px) and (min-width: 768px) {
    .documentation-main {
        padding: 80px 0;
    }
    
    .documentation-container {
        padding: 0 24px;
    }
    
    .page-title {
        font-size: 42px;
        margin-bottom: 50px;
    }
    
    .search-container {
        max-width: 350px;
    }
    
    .table-header, .table-row {
        grid-template-columns: 1fr 1.5fr;
        gap: 20px;
        padding: 20px;
        place-items: center;
    }
    
    .guide-content {
        gap: 12px;
    }
    
    .pdf-icon {
        width: 36px;
        height: 36px;
    }
    
    .pdf-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .guide-text-link {
        font-size: 13px;
    }
}

/* Mobile Large: 431px - 767px */
@media (max-width: 767px) and (min-width: 431px) {
    .documentation-main {
        padding: 60px 0;
    }
    
    .documentation-container {
        padding: 0 20px;
    }
    
    .page-title {
        font-size: 36px;
        margin-bottom: 40px;
    }
    
    .search-section {
        margin-bottom: 30px;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .search-input {
        padding: 14px 40px;
        font-size: 16px;
    }
    
    .table-header {
        display: none;
    }
    
    .table-row {
        display: block;
        padding: 20px;
        gap: 0;
        place-items: center;
    }
    
    .country-col {
        margin-bottom: 16px;
        font-size: 18px;
        justify-content: flex-start;
    }
    
    .guides-col {
        margin-bottom: 16px;
    }
    
    .mobile-section-title {
        display: block;
    }
    
    .guide-content {
        gap: 12px;
    }
    
    .pdf-icon {
        width: 32px;
        height: 32px;
    }
    
    .pdf-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .guide-text-link {
        font-size: 14px;
        padding: 6px 0;
    }
    
    .country-placeholder .placeholder-col,
    .country-placeholder-bottom .placeholder-col {
        margin-bottom: 12px;
    }
    
    .placeholder-content {
        display: block;
    }
    
    .placeholder-simple {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Mobile Medium: 393px - 430px */
@media (max-width: 430px) and (min-width: 393px) {
    .documentation-main {
        padding: 50px 0;
    }
    
    .documentation-container {
        padding: 0 16px;
    }
    
    .page-title {
        font-size: 32px;
        margin-bottom: 35px;
    }
    
    .search-input {
        padding: 12px 36px;
        font-size: 15px;
    }
    
    .table-row {
        padding: 16px;
        place-items: center;
    }
    
    .country-col {
        font-size: 13px;
        margin-bottom: 14px;
    }
    
    .flag-icon {
        width: 20px;
        height: 15px;
    }
    
    .pdf-icon {
        width: 30px;
        height: 30px;
    }
    
    .pdf-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .guide-text-link {
        font-size: 13px;
        padding: 5px 0;
    }
}

/* Mobile Small: 320px - 392px */
@media (max-width: 392px) {
    .documentation-main {
        padding: 40px 0;
    }
    
    .documentation-container {
        padding: 0 12px;
    }
    
    .page-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .search-input {
        padding: 10px 32px;
        font-size: 14px;
    }
    
    .search-icon {
        left: 12px;
    }
    
    .search-clear {
        right: 12px;
    }
    
    .table-row {
        padding: 14px;
        place-items: center;
    }
    
    .country-col {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .flag-icon {
        width: 18px;
        height: 14px;
    }
    
    .mobile-section-title {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .pdf-icon {
        width: 28px;
        height: 28px;
    }
    
    .pdf-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .guide-text-link {
        font-size: 12px;
        padding: 4px 0;
    }
    
    .placeholder-text {
        font-size: 14px;
    }
    
    .placeholder-count,
    .placeholder-action {
        font-size: 12px;
    }
}

/* Print styles */
@media print {
    .search-section,
    .country-placeholder,
    .country-placeholder-bottom {
        display: none !important;
    }
    
    .documentation-main {
        background: white;
        padding: 0;
    }
    
    .table-row {
        display: grid !important;
        grid-template-columns: 1fr 2fr !important;
        page-break-inside: avoid;
    }
    
    .mobile-section-title {
        display: none !important;
    }
    
    .table-header {
        display: grid !important;
        grid-template-columns: 1fr 2fr !important;
    }
    
    .guides-col {
        display: block !important;
    }
    
    .guide-content {
        gap: 8px !important;
    }
    
    .pdf-icon {
        display: none !important;
    }
    
    .guide-links {
        margin-left: 0 !important;
    }
}

/* Focus styles for accessibility */
.search-input:focus,
.guide-text-link:focus,
.country-placeholder:focus,
.country-placeholder-bottom:focus {
    outline: 2px solid #377CF7;
    outline-offset: 2px;
}

/* Smooth scrolling */
.documentation-main {
    scroll-behavior: smooth;
}

/* Animation for show/hide */
.country-row {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}