/* ==========================================================================
   PORTAL-SPECIFIC STYLES (domain checker, monitor, table, Bootstrap modals)
   Extends ad_project design
   ========================================================================== */

/* --------------------------------------------------------------------------
   BLOCK 0: black bg like site, link LEFT logo RIGHT (like block 1 layout)
   -------------------------------------------------------------------------- */
.block-0 {
    width: 100%;
    background: #000;
    padding: 16px 0 24px;
    min-height: 60px;
}

.block-0 .gov-container {
    display: flex;
    flex-direction: column;
}

.block-0__banner {
    display: block;
    width: 100%;
    text-align: center !important;
    font-size: 14px;
    color: #a1a1a1;
    margin-bottom: 12px;
}

.block-0__inner {
    width: 100%;
}

.block-0__link {
    font-size: 16px;
    color: #fff;
    text-decoration: none;
    padding-top: 8px;
    display: inline-block;
}

.block-0__link:hover {
    opacity: 0.8;
}

.block-0__logo .header_logo-icon {
    height: 40px;
    width: auto;
}


/* --------------------------------------------------------------------------
   0b. WARNING SIGNS WITH DESCRIPTIONS
   -------------------------------------------------------------------------- */
.warning-signs-item--with-desc {
    flex-direction: row;
    align-items: center;
}

.warning-signs-item--with-desc .warning-signs-item-icon {
    margin-right: 24px;
    margin-bottom: 0;
    flex-shrink: 0;
}

.warning-signs-item-title {
    font-size: 16px;
    line-height: 24px;
    color: #fff;
    font-weight: 400;
    margin-bottom: 8px;
}

.warning-signs-item-desc {
    font-size: 14px;
    line-height: 20px;
    color: #a1a1a1;
    font-weight: 300;
}

@media (max-width: 767.98px) {
    .warning-signs-item--with-desc {
        min-width: 220px;
        flex-direction: row;
        align-items: center;
    }
    .warning-signs-item--with-desc .warning-signs-item-icon {
        margin-right: 16px;
        margin-bottom: 0;
    }
    .warning-signs-item-title {
        font-size: 13px;
    }
    .warning-signs-item-desc {
        font-size: 12px;
    }
}

/* --------------------------------------------------------------------------
   0c. URL TRUNCATE (show domain for long URLs)
   -------------------------------------------------------------------------- */
.url-truncate {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer - merged with table, just a line and text, no blocks no gaps */
/* Footer: як на ad_project - divider відділяє базу (таблицю) від Playcity/playcity.gov.ua */
#layout-footer {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#layout-footer .gov-container {
    margin-top: 0 !important;
}

.table-section {
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.content-with-table {
    margin-bottom: 0 !important;
}

.content-with-table .table-section {
    margin-bottom: 0 !important;
}

#layout-footer .footer {
    background: #000;
    padding: 24px 2rem 32px;
    margin-top: 0 !important;
}

#layout-content {
    margin-bottom: 0 !important;
}

#layout-footer .footer-divider {
    display: none;
}

#layout-footer .footer_logo .header_logo-icon {
    height: 40px;
    width: auto;
}

#layout-footer .property-block-text {
    font-size: 13px;
    line-height: 18px;
    color: #a1a1a1;
    text-align: right;
}

#layout-footer .property-block-text a {
    color: #a1a1a1;
    text-decoration: none;
}

#layout-footer .property-block-text a:hover {
    color: #fff;
}

/* Primary buttons - white on dark (ad_project style) */
.btn-primary {
    background: #fff !important;
    color: #000 !important;
    border: none !important;
}

.btn-primary:hover {
    background: #e5e5e5 !important;
    color: #000 !important;
}

/* "Як це працює" block - green icons (not red warning) */
.section-block .warning-signs-item-icon {
    color: #00a110;
    transform: none;
}

/* Block 1 - фон, контент по центру блоку (вертикаль + горизонталь) */
.hero-block-with-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-block-with-bg .row {
    width: 100%;
}

/* Обидва тексти по центру один одного (вертикаль) */

.hero-block-with-bg .page-title {
    font-size: 40px;
    line-height: 44px;
    /* Підняти: margin-top: -20px; Опустити: margin-top: 20px; */
    margin-top: 30px;
}

.hero-row-centered {
    margin-top: 0 !important;
}

/* Block 1 - збільшена висота (з фоном), однакові відступи зверху і знизу */
.section-panel-small {
    padding: 112px 60px 112px !important;
}

@media (max-width: 767.98px) {
    .section-panel-small {
        padding: 72px 24px 72px !important;
    }
}

/* Block 2 - зменшена висота пунктів "Як це працює" */
.section-block .warning-signs-item {
    padding: 24px 48px !important;
}

.section-block .warning-signs {
    margin-top: 20px;
}

.section-block {
    padding: 32px 32px 40px !important;
}

@media (max-width: 767.98px) {
    .section-block .warning-signs-item {
        padding: 16px 20px !important;
    }
    .section-block {
        padding: 20px 16px 28px !important;
    }
    .section-block .warning-signs {
        margin-top: 12px;
    }
}

/* Менший відступ між заголовком і контентом — у всіх блоків */
.section-block .warning-signs-title-secondary {
    margin-bottom: 12px !important;
}

@media (max-width: 767.98px) {
    .section-block .warning-signs-title-secondary {
        margin-bottom: 10px !important;
    }
}

/* --------------------------------------------------------------------------
   1. BLOCK 3: Stats + Domain checker (ad_project style)
   -------------------------------------------------------------------------- */
.portal-block3.warning-panel {
    padding: 32px 32px 40px !important;
    transition: background 0.4s ease;
}

/* Градієнт за статусом перевірки */
.portal-block3--neutral {
    background: linear-gradient(360deg, rgba(255,255,255,0.7) 0%, rgba(0,161,16,0.5) 10%, rgb(17,17,17) 40%, rgb(17,17,17) 100%) !important;
}

.portal-block3--legal {
    background: linear-gradient(360deg, rgba(255,255,255,0.06) 0%, rgba(0,161,16,0.4) 15%, rgb(17,17,17) 45%, rgb(17,17,17) 100%) !important;
}

.portal-block3--blocked {
    background: linear-gradient(360deg, rgba(255,255,255,0.04) 0%, rgba(218,13,13,0.35) 15%, rgb(17,17,17) 45%, rgb(17,17,17) 100%) !important;
}

.portal-block3--check {
    background: linear-gradient(360deg, rgba(255,255,255,0.04) 0%, rgba(59,130,246,0.35) 15%, rgb(17,17,17) 45%, rgb(17,17,17) 100%) !important;
}

.portal-block3--processing {
    background: linear-gradient(360deg, rgba(255,255,255,0.04) 0%, rgba(202,138,4,0.35) 15%, rgb(17,17,17) 45%, rgb(17,17,17) 100%) !important;
}

.portal-block3--rejected {
    background: linear-gradient(360deg, rgba(255,255,255,0.04) 0%, rgba(100,100,100,0.2) 15%, rgb(17,17,17) 45%, rgb(17,17,17) 100%) !important;
}

.portal-block3--not-found {
    background: linear-gradient(360deg, rgba(255,255,255,0.04) 0%, rgba(80,80,80,0.15) 15%, rgb(17,17,17) 45%, rgb(17,17,17) 100%) !important;
}

@media (max-width: 767.98px) {
    .portal-block3.warning-panel {
        padding: 20px 16px 28px !important;
    }
}

.portal-block3 .warning-register {
    margin-top: 20px;
}

@media (max-width: 767.98px) {
    .portal-block3 .warning-register {
        margin-top: 16px;
    }
}

/* Заголовок і статус — менший відступ між заголовком і контентом */
.portal-stats-header {
    margin-bottom: 12px;
}

.portal-block3 .portal-stats-header .warning-signs-title-secondary {
    margin-bottom: 8px !important;
}

.portal-stats-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-stats-status-text {
    font-size: 14px;
    color: #a1a1a1;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator--active {
    background: #00a110;
    box-shadow: 0 0 8px rgba(0, 161, 16, 0.6);
}

.status-indicator--inactive {
    background: #d80d0d;
    box-shadow: 0 0 8px rgba(218, 13, 13, 0.4);
}

/* Stats row: 2 compact cards ЗАВЖДИ в один рядок - без row/row-custom! */
.portal-stats-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px;
}

.portal-stat-col {
    flex: 1 1 0;
    min-width: 0;
}

.portal-block3 .statistic-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 16px;
}

.portal-block3 .statistic-card-title {
    font-size: 14px;
    line-height: 18px;
    margin: 0;
    white-space: nowrap;
}

.portal-block3 .statistic-card span {
    font-size: 18px;
    line-height: 22px;
    font-weight: 500;
}

/* Мобільна версія: stats у стовпчик */
@media (max-width: 767.98px) {
    .portal-stats-row {
        flex-direction: column !important;
        flex-wrap: wrap !important;
    }
    .portal-stat-col {
        flex: 1 1 auto;
        min-width: 100%;
    }
}

/* Domain checker input in warning-register */
.portal-domain-check-register .domain-check-input-wrap {
    max-width: 100%;
}

.portal-domain-check-register .domain-check-input {
    min-width: 240px;
    max-width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #fff;
    padding: 16px 20px;
    font-size: 16px;
}

.portal-domain-check-register .domain-check-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.portal-domain-check-register .domain-check-input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
    outline: none;
}

/* Result area - two-column layout, softer styling */
.check-result-area {
    min-height: 0;
}

.check-result-area .alert {
    border-radius: 20px;
    padding: 20px 24px;
    font-size: 15px;
    line-height: 22px;
}

.check-result-area .check-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
}

@media (max-width: 575.98px) {
    .check-result-area .check-result-grid {
        grid-template-columns: 1fr;
    }
}

.check-result-area .check-result-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    text-align: left;
}

.check-result-area .check-result-cell .status-badge {
    width: fit-content;
}

.check-result-area .check-result-cell strong {
    font-size: 12px;
    font-weight: 400;
    color: #a1a1a1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.check-result-area .alert-result-found {
    background: rgba(27, 27, 27, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.check-result-area .alert-result-not-found {
    background: rgba(0, 161, 16, 0.12);
    border: 1px solid rgba(0, 161, 16, 0.25);
    color: #fff;
}

.check-result-area .alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #fff;
    border-radius: 20px;
}

.check-result-area .alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.25);
    color: #fff;
    border-radius: 20px;
}

/* Complain button - тільки колір як Перевірити (білий), розмір не змінюємо */
.check-result-area .complain-btn {
    background: #fff !important;
    color: #000 !important;
    border: none !important;
}

.check-result-area .complain-btn:hover {
    background: #e5e5e5 !important;
    color: #000 !important;
}

/* --------------------------------------------------------------------------
   2. TABLE SECTION
   -------------------------------------------------------------------------- */
.table-section {
    background: #111;
    border-radius: 32px;
    padding: 32px;
    margin-bottom: 0 !important;
}

.table-section h4 {
    font-size: 20px;
    line-height: 24px;
    color: #fff;
    margin-bottom: 12px;
}

.table-section .d-flex.mb-4 {
    margin-bottom: 16px !important;
}

.table-section .table {
    color: #fff;
    --bs-table-bg: transparent;
    --bs-table-border-color: #303030;
}

.table-section .table thead th {
    color: #fff;
    background: #1b1b1b;
    border-color: #303030;
    border-right: 1px solid #303030;
    padding: 16px;
}

.table-section .table thead th:last-child {
    border-right: none;
}

.table-section .table tbody td {
    border-color: #303030;
    border-right: 1px solid #303030;
    padding: 16px;
    color: #fff;
}

.table-section .table .status-col {
    text-align: center;
}

.table-section .table .reason-col {
    text-align: left;
}

.table-section .table tbody td:last-child {
    border-right: none;
}

.table-section .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Status badges - гармонійно з дизайном: border + напівпрозорий фон */
.status-badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
    text-align: center;
    display: inline-block;
}

.status-легальний {
    background: rgba(0, 161, 16, 0.18);
    border-color: #00a110;
    color: #fff;
}

.status-заблокований {
    background: rgba(218, 13, 13, 0.18);
    border-color: #d80d0d;
    color: #fff;
}

.status-перевірка {
    background: rgba(59, 130, 246, 0.18);
    border-color: #3b82f6;
    color: #fff;
}

.status-опрацювання,
.status-опрацьована {
    background: rgba(202, 138, 4, 0.18);
    border-color: #ca8a04;
    color: #fff;
}

.status-відхилено,
.status-анульовано {
    background: rgba(255, 255, 255, 0.06);
    border-color: #404040;
    color: #a1a1a1;
}

/* Alerts for domain check result */
.alert-result-found {
    background: rgba(218, 13, 13, 0.15);
    border: 1px solid #d80d0d;
    color: #fff;
    border-radius: 12px;
}

.alert-result-not-found {
    background: rgba(0, 161, 16, 0.15);
    border: 1px solid #00a110;
    color: #fff;
    border-radius: 12px;
}

/* --------------------------------------------------------------------------
   3. BOOTSTRAP MODAL OVERRIDES (ad_project style)
   -------------------------------------------------------------------------- */
.modal-content {
    background: rgba(27, 27, 27, 0.98) !important;
    border: 1px solid #303030 !important;
    border-radius: 32px !important;
    color: #fff !important;
}

.modal-header {
    border-bottom: 1px solid #303030 !important;
    padding: 24px 32px !important;
}

.modal-title {
    color: #fff !important;
    font-size: 20px !important;
}

.modal-body {
    padding: 24px 32px !important;
    color: #fff !important;
}

.modal-body .form-control {
    background: transparent !important;
    border: 2px solid #444 !important;
    color: #fff !important;
    border-radius: 12px !important;
}

.modal-body .form-control:focus {
    border-color: #00a110 !important;
    box-shadow: none !important;
}

.modal-body .form-control::placeholder {
    color: #9b9b9b !important;
}

.modal-body .form-label {
    color: #fff !important;
}

.modal-footer {
    border-top: 1px solid #303030 !important;
    padding: 24px 32px !important;
}

.modal .btn-outline-light {
    background: transparent !important;
    border: 2px solid #fff !important;
    color: #fff !important;
    border-radius: 12px !important;
}

.modal .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.modal .btn-warning {
    background: #fff !important;
    color: #000 !important;
    border: none !important;
}

.modal .btn-warning:hover {
    background: #e5e5e5 !important;
    color: #000 !important;
}

.form-check-input {
    background: transparent !important;
    border: 2px solid #444 !important;
}

.form-check-input:checked {
    background-color: #00a110 !important;
    border-color: #00a110 !important;
}

.form-check-label {
    color: #fff !important;
}

.btn-close-white {
    filter: invert(1);
}

/* --------------------------------------------------------------------------
   4. TABLE RESPONSIVE (mobile cards)
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .table-fixed thead {
        display: none;
    }

    .table-fixed tr {
        display: block;
        margin-bottom: 16px;
        background: #1b1b1b;
        border-radius: 16px;
        padding: 16px;
        border: 1px solid #303030;
    }

    .table-fixed td {
        display: block;
        padding: 8px 0;
        border: none !important;
        border-right: none !important;
    }

    .table-fixed td::before {
        content: attr(data-label);
        display: block;
        font-weight: 400;
        font-size: 12px;
        color: #a1a1a1;
        margin-bottom: 4px;
    }

    .table-fixed .domain-col {
        font-size: 16px;
        font-weight: 500;
        padding-top: 12px;
    }

    .table-fixed .domain-col::before {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   5. ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes flash-in {
    from { background-color: rgba(0, 161, 16, 0.2); }
    to { background-color: transparent; }
}

.table-is-updating tr {
    animation: flash-in 1.5s ease-out;
}

/* --------------------------------------------------------------------------
   6. PAGINATION (темна тема, нейтральні кольори)
   -------------------------------------------------------------------------- */
.pagination .page-link {
    background: #1b1b1b !important;
    border-color: #303030 !important;
    color: #fff !important;
}

.pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #555 !important;
    color: #fff !important;
}

.pagination .page-item.active .page-link {
    background: #fff !important;
    border-color: #fff !important;
    color: #000 !important;
}

.pagination .page-item.disabled .page-link {
    background: #1b1b1b !important;
    border-color: #303030 !important;
    color: #666 !important;
}

/* --------------------------------------------------------------------------
   7. MAINTENANCE PAGE
   -------------------------------------------------------------------------- */
.maintenance-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.maintenance-content {
    max-width: 600px;
    background: #1b1b1b;
    border: 1px solid #303030;
    border-radius: 32px;
    padding: 3rem 2rem;
    text-align: center;
}

.maintenance-icon {
    font-size: 4rem;
    color: #00a110;
    margin-bottom: 2rem;
}

.maintenance-title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}

.maintenance-message {
    font-size: 1.1rem;
    color: #a1a1a1;
    margin-bottom: 2rem;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.loading-dots .dot {
    width: 12px;
    height: 12px;
    background: #00a110;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite both;
}

.loading-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dots .dot:nth-child(3) { animation-delay: 0s; }
.loading-dots .dot:nth-child(4) { animation-delay: 0.16s; }
.loading-dots .dot:nth-child(5) { animation-delay: 0.32s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.maintenance-info p {
    color: #a1a1a1;
}
