/* Service Status Page Styles - Based on Sumsub Design */

.service-status-main {
    min-height: 100vh;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'proxima-nova', Roboto, sans-serif;
    padding: 100px 0
}

.service-status-container {
    max-width: 800px;
    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;
}

.status-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;
}

.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;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background-color: #fafbfc;
}

.country-col {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    gap: 12px;
    flex-direction: row;
    justify-content: center;
}

.flag-icon {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.document-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.status-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}

.status-text {
    font-size: 12px;
    font-weight: 500;
    color: #2BD4AB;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uptime-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar {
    height: 32px;
    background: #f1f3f4;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    display: flex;
}

.progress-fill {
    height: 100%;
    display: flex;
}

.progress-fill.operational {
    background: linear-gradient(90deg, #2BD4AB 0%, #26c299 100%);
    width: 100%;
    position: relative;
}

/* Create the effect of multiple bars showing 90-day history */
.progress-fill.operational::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.2) 2px,
            rgba(255, 255, 255, 0.2) 3px
        );
}

.uptime-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #AAAAAA;
}

.uptime-percentage {
    font-weight: 600;
    color: #333333;
}

.uptime-period {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.uptime-period span:first-child::before {
    content: '90 days ago';
}

.uptime-period span:last-child::after {
    content: 'Today';
}

/* Mobile section title - hidden by default */
.mobile-section-title {
    display: none;
    font-size: 16px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
    .service-status-container {
        padding: 0 16px;
    }
    
    .page-title {
        font-size: 24px;
        margin-bottom: 40px;
    }
    
    /* Search responsive */
    .search-section {
        margin-bottom: 30px;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .search-input {
        font-size: 16px;
        padding: 14px 16px 14px 48px;
    }
    
    /* Hide table headers on mobile */
    .table-header {
        display: none;
    }
    
    /* Show mobile section titles */
    .mobile-section-title {
        display: block;
    }
    
    .table-row {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        margin-bottom: 8px;
        border-radius: 8px;
    }
    
    #countries-container .table-row.country-row.country-visible {
        display: flex !important;
    }
    
    #countries-container .table-row.country-row.country-hidden {
        display: none !important;
    }
    
    #countries-container .table-row.country-row.country-placeholder {
        display: flex !important;
    }
    
    .country-col {
        font-size: 18px;
        font-weight: 600;
        padding-bottom: 12px;
        border-bottom: 2px solid #2BD4AB;
        margin-bottom: 8px;
    }
    
    .document-col {
        gap: 12px;
    }
    
    .status-bar {
        padding: 12px;
    }
    
    /* Show more button responsive */
    .show-more-button {
        padding: 14px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .service-status-container {
        padding: 0 12px;
    }
    
    .page-title {
        font-size: 20px;
        margin-bottom: 30px;
    }
    
    /* Search mobile styles */
    .search-section {
        margin-bottom: 24px;
    }
    
    .search-input {
        padding: 12px 14px 12px 44px;
        font-size: 16px;
    }
    
    .search-icon {
        left: 14px;
    }
    
    .search-clear {
        right: 10px;
    }
    
    .status-table {
        border-radius: 8px;
    }
    
    .table-row {
        padding: 5px;
        margin-bottom: 12px;
    }
    
    .country-col {
        font-size: 16px;
        padding-bottom: 10px;
    }
    
    .flag-icon {
        width: 20px;
        height: 15px;
    }
    
    .mobile-section-title {
        font-size: 14px;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }
    
    .status-bar {
        padding: 10px;
    }
    
    .progress-bar {
        height: 28px;
    }
    
    /* Show more button small screens */
    .show-more-button {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .show-more-text {
        font-size: 14px;
    }
}

/* Additional status states for future use */
.progress-fill.maintenance {
    background: linear-gradient(90deg, #3498DB 0%, #2980b9 100%);
}

.progress-fill.degraded {
    background: linear-gradient(90deg, #F1C40F 0%, #e67e22 100%);
}

.progress-fill.down {
    background: linear-gradient(90deg, #E74C3C 0%, #c0392b 100%);
}

.status-text.maintenance {
    color: #3498DB;
}

.status-text.degraded {
    color: #F1C40F;
}

.status-text.down {
    color: #E74C3C;
}

/* Search Section Styles */
.search-section {
    margin-bottom: 40px;
}

.search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    font-size: 16px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'proxima-nova', Roboto, sans-serif;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.search-input:focus {
    outline: none;
    border-color: #2BD4AB;
    box-shadow: 0 0 0 3px rgba(43, 212, 171, 0.1);
}

.search-input::placeholder {
    color: #AAAAAA;
    font-weight: 400;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.search-clear:hover {
    background-color: #f1f3f4;
}

/* Show More Button Styles */
.show-more-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.show-more-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fafbfc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #666666;
    font-weight: 500;
}

.show-more-button:hover {
    background: #f1f3f4;
    border-color: #2BD4AB;
    color: #333333;
}

.show-more-icon {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease;
}

.show-more-button:hover .show-more-icon {
    transform: translateY(2px);
}

/* Country Row States */
.country-row {
    transition: all 0.3s ease;
}

#countries-container .table-row.country-row.country-hidden {
    display: none !important;
}

#countries-container .table-row.country-row.country-visible {
    display: grid !important;
}

#countries-container .table-row.country-row.country-placeholder,
#countries-container .table-row.country-row.country-placeholder-bottom {
    display: grid !important;
}

/* When expanded, show all countries */
.countries-expanded .table-row.country-row:not(.country-placeholder):not(.country-placeholder-bottom) {
    display: grid !important;
}

/* Force display for search results */
.country-row.search-result {
    display: grid !important;
}

.country-row.search-result {
    animation: searchHighlight 0.3s ease;
}

@keyframes searchHighlight {
    0% {
        background-color: rgba(43, 212, 171, 0.1);
    }
    100% {
        background-color: transparent;
    }
}

/* Countries Container */
#countries-container {
    position: relative;
}

/* Country Placeholder Styles */
.country-placeholder, .country-placeholder-bottom {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin: 8px 0;
    background: #fafbfc;
    width: 100%;
    min-height: 60px;
}

.country-placeholder:hover, .country-placeholder-bottom:hover {
    background-color: #f1f3f4;
    border-color: #2BD4AB;
    box-shadow: 0 2px 8px rgba(43, 212, 171, 0.1);
}

.placeholder-col {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: #666666;
    gap: 12px;
    flex-direction: row;
    justify-content: center;
    position: relative;
}

.placeholder-text {
    color: #2BD4AB;
    font-weight: 600;
    flex-grow: 1;
}

.placeholder-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.placeholder-arrow-up svg {
    transform: rotate(180deg);
}

.country-placeholder:hover .placeholder-arrow,
.country-placeholder-bottom:hover .placeholder-arrow {
    transform: translateY(2px);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    padding: 8px 0;
}

.placeholder-simple {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.placeholder-count {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
}

.placeholder-action {
    font-size: 12px;
    color: #AAAAAA;
    font-weight: 400;
}


/* Mobile responsive styles for placeholder */
@media (max-width: 768px) {
    .country-placeholder, .country-placeholder-bottom {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        margin-bottom: 8px;
        border-radius: 6px;
    }
    
    .placeholder-col {
        font-size: 14px;
        padding-bottom: 8px;
        border-bottom: 1px solid #2BD4AB;
        margin-bottom: 8px;
        justify-content: flex-start;
    }
    
    .placeholder-content {
        padding: 4px 0;
    }
}

@media (max-width: 480px) {
    .placeholder-col {
        font-size: 13px;
        padding-bottom: 6px;
    }
    
    .placeholder-count {
        font-size: 13px;
    }
    
    .placeholder-action {
        font-size: 11px;
    }
}

/* Fix for bottom placeholder display issues */
.country-placeholder-bottom {
    box-sizing: border-box !important;
}

.country-placeholder-bottom .placeholder-col,
.country-placeholder-bottom .placeholder-content {
    width: 100% !important;
}

/* Ensure proper grid layout for placeholders */
.table-row.country-placeholder {
    display: grid !important;
    grid-template-columns: 1fr 2fr !important;
    width: 100% !important;
}

.table-row.country-placeholder-bottom {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 20px 24px !important;
}

.country-placeholder-bottom .placeholder-col {
    justify-content: center !important;
    text-align: center !important;
    width: auto !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.country-placeholder-bottom .placeholder-content {
    display: none !important;
}

/* Mobile fix for placeholders */
@media (max-width: 768px) {
    .table-row.country-placeholder {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .table-row.country-placeholder-bottom {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 16px !important;
    }
    
    .country-placeholder-bottom .placeholder-col {
        width: auto !important;
        justify-content: center !important;
        text-align: center !important;
        border-bottom: none !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

/* ========================================
   ТЕМНАЯ ТЕМА - DARK MODE STYLES
   Все стили темной темы сгруппированы здесь для лучшей организации
   ======================================== */

/* Основные стили темной темы */
.dark .service-status-main {
    background-color: #111827;
    color: #e5e7eb;
}

.dark .service-status-container {
    color: #e5e7eb;
}

.dark .page-title {
    color: #ffffff;
}

/* Стили таблицы в темной теме */
.dark .status-table {
    background: #1f2937;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.dark .table-header {
    background: #111827;
    border-bottom: 1px solid #374151;
}

.dark .header-col {
    color: #9ca3af;
}

.dark .table-row {
    border-bottom: 1px solid #374151;
}

.dark .table-row:hover {
    background-color: #374151;
}

.dark .country-col {
    color: #ffffff;
}

/* Стили статус-баров в темной теме */
.dark .status-bar {
    background: #111827;
    border: 1px solid #374151;
}

.dark .status-label {
    color: #ffffff;
}

.dark .status-text.operational {
    color: #10b981;
}

.dark .status-text.maintenance {
    color: #60a5fa;
}

.dark .status-text.degraded {
    color: #fbbf24;
}

.dark .status-text.down {
    color: #ef4444;
}

/* Стили прогресс-баров в темной теме */
.dark .progress-bar {
    background: #374151;
}

.dark .progress-fill.operational {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.dark .progress-fill.maintenance {
    background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%);
}

.dark .progress-fill.degraded {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.dark .progress-fill.down {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.dark .uptime-info {
    color: #9ca3af;
}

.dark .uptime-percentage {
    color: #ffffff;
}

/* Стили поиска в темной теме */
.dark .search-input {
    background: #1f2937;
    color: #ffffff;
    border: 1px solid #374151;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .search-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.dark .search-input::placeholder {
    color: #6b7280;
}

.dark .search-icon svg path {
    stroke: #6b7280;
}

.dark .search-clear {
    color: #6b7280;
}

.dark .search-clear:hover {
    background-color: #374151;
}

.dark .search-clear svg path {
    stroke: #6b7280;
}

/* Стили placeholder в темной теме */
.dark .country-placeholder,
.dark .country-placeholder-bottom {
    background: #1f2937;
    border: 1px solid #374151;
}

.dark .country-placeholder:hover,
.dark .country-placeholder-bottom:hover {
    background-color: #374151;
    border-color: #60a5fa;
    box-shadow: 0 2px 8px rgba(96, 165, 250, 0.1);
}

.dark .placeholder-col {
    color: #9ca3af;
}

.dark .placeholder-text {
    color: #60a5fa;
}

.dark .placeholder-count {
    color: #ffffff;
}

.dark .placeholder-action {
    color: #6b7280;
}

.dark .placeholder-arrow svg path {
    stroke: #9ca3af;
}

/* Стили mobile section title в темной теме */
.dark .mobile-section-title {
    color: #9ca3af;
    border-bottom: 1px solid #374151;
}

/* Анимация поиска в темной теме */
.dark .country-row.search-result {
    animation: darkSearchHighlight 0.3s ease;
}

@keyframes darkSearchHighlight {
    0% {
        background-color: rgba(96, 165, 250, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

/* ========================================
   ЭКСТРА-МАЛЫЕ ЭКРАНЫ - 320PX И МЕНЬШЕ
   Профессиональная адаптация для сверхмалых устройств
   ======================================== */

@media (max-width: 320px) {
    .service-status-main {
        padding: 60px 0;
        min-height: 100vh;
    }
    
    .service-status-container {
        padding: 0 8px;
        max-width: 100%;
    }
    
    /* Заголовок страницы */
    .page-title {
        font-size: 18px;
        margin-bottom: 24px;
        line-height: 1.2;
        letter-spacing: -0.02em;
    }
    
    /* Поисковая секция */
    .search-section {
        margin-bottom: 20px;
    }
    
    .search-container {
        max-width: 100%;
        margin: 0;
    }
    
    .search-input {
        padding: 10px 12px 10px 36px;
        font-size: 14px;
        border-radius: 6px;
        height: 40px;
        box-sizing: border-box;
    }
    
    .search-icon {
        left: 10px;
        width: 16px;
        height: 16px;
    }
    
    .search-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .search-clear {
        right: 8px;
        width: 20px;
        height: 20px;
    }
    
    .search-clear svg {
        width: 12px;
        height: 12px;
    }
    
    /* Таблица статусов */
    .status-table {
        border-radius: 6px;
        overflow: hidden;
        margin: 0 -4px;
    }
    
    .table-row {
        padding: 12px;
        margin-bottom: 8px;
        border-radius: 6px;
        gap: 12px;
    }
    
    /* Колонка стран */
    .country-col {
        font-size: 14px;
        font-weight: 600;
        padding-bottom: 8px;
        margin-bottom: 6px;
        border-bottom: 1px solid #2BD4AB;
        gap: 8px;
    }
    
    .flag-icon {
        width: 18px;
        height: 13px;
        border-radius: 1px;
    }
    
    /* Mobile section title */
    .mobile-section-title {
        font-size: 12px;
        margin-bottom: 10px;
        padding-bottom: 4px;
        letter-spacing: 0.3px;
    }
    
    /* Status bars */
    .document-col {
        gap: 8px;
    }
    
    .status-bar {
        padding: 8px;
        border-radius: 6px;
        gap: 6px;
    }
    
    .status-bar-header {
        gap: 8px;
    }
    
    .status-label {
        font-size: 12px;
        font-weight: 600;
    }
    
    .status-text {
        font-size: 10px;
        letter-spacing: 0.3px;
        font-weight: 600;
    }
    
    /* Progress bars */
    .progress-bar {
        height: 24px;
        border-radius: 3px;
    }
    
    /* Uptime info */
    .uptime-info {
        font-size: 10px;
        gap: 4px;
    }
    
    .uptime-percentage {
        font-weight: 600;
        font-size: 11px;
    }
    
    /* Placeholder кнопки */
    .country-placeholder, 
    .country-placeholder-bottom {
        padding: 10px;
        margin: 6px 0;
        border-radius: 4px;
        min-height: 50px;
    }
    
    .table-row.country-placeholder-bottom {
        display: flex !important;
        flex-direction: row !important;
        padding: 12px !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .placeholder-col {
        font-size: 12px;
        padding-bottom: 6px;
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .placeholder-text {
        font-weight: 600;
        font-size: 12px;
    }
    
    .placeholder-count {
        font-size: 11px;
    }
    
    .placeholder-action {
        font-size: 9px;
    }
    
    .placeholder-arrow {
        width: 14px;
        height: 14px;
    }
    
    .placeholder-arrow svg {
        width: 12px;
        height: 12px;
    }
    
    /* Компактные отступы для контейнера */
    #countries-container {
        margin: 0 -2px;
    }
}

/* Темная тема для экстра-малых экранов */
@media (max-width: 320px) {
    .dark .country-col {
        border-bottom: 1px solid #60a5fa;
    }
    
    .dark .mobile-section-title {
        border-bottom: 1px solid #374151;
    }
    
    .dark .search-input {
        background: #1f2937;
        border: 1px solid #374151;
    }
    
    .dark .search-input:focus {
        border-color: #60a5fa;
        box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.1);
    }
    
    .dark .status-table {
        background: #1f2937;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .dark .table-row {
        background: #1f2937;
        border-bottom: 1px solid #374151;
    }
    
    .dark .table-row:hover {
        background-color: #374151;
    }
    
    .dark .status-bar {
        background: #111827;
        border: 1px solid #374151;
    }
    
    .dark .country-placeholder,
    .dark .country-placeholder-bottom {
        background: #1f2937;
        border: 1px solid #374151;
    }
    
    .dark .country-placeholder:hover,
    .dark .country-placeholder-bottom:hover {
        background-color: #374151;
        border-color: #60a5fa;
        box-shadow: 0 2px 6px rgba(96, 165, 250, 0.15);
    }
}