/* ==========================================================================
   PB Down Timer – Status Monitoring Page
   ========================================================================== */

/* ---------- Page background ---------- */
.pb-dt {
    background-color: #15151f;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: #ffffff;
}

body.page-template-templates\/page-pb-down-timer-php {
    background-color: #15151f;
}

/* ---------- Hero ---------- */
.pb-dt__hero {
    padding-top: 9rem !important;
    padding-bottom: 1rem;
}

.pb-dt__hero-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.pb-dt__hero-subtitle {
    font-size: 1.05rem;
    color: #8b92a5;
    max-width: 560px;
    margin-bottom: 0;
    line-height: 1.6;
}

/* ---------- Badges ---------- */
.pb-dt__badges {
    margin-top: 1.5rem;
}

.pb-dt__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.pb-dt__badge--live {
    background-color: #102733;
    color: #10b981;
    border: 1px solid #104443;
    font-weight: 700;
}

.pb-dt__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
    display: inline-block;
    animation: pb-dt-pulse 2s infinite;
}

@keyframes pb-dt-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.pb-dt__badge--updated {
    background-color: rgba(100, 116, 139, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.pb-dt__badge--updated svg {
    flex-shrink: 0;
}

/* ---------- Group section ---------- */
.pb-dt__group-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.25rem;
}

/* ---------- Cards ---------- */
.pb-dt__grid-section .row > [class*="col"] {
    display: flex;
}

.pb-dt__card {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 14px;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pb-dt__card:hover {
    border-color: #334155;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Card top: logo + badge */
.pb-dt__card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.pb-dt__card-logo {
    width: 55px;
    height: 55px;
    border-radius: 23%;
    overflow: hidden;
    background-color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pb-dt__card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.pb-dt__card-logo-placeholder {
    font-size: 1.2rem;
    font-weight: 700;
    color: #64748b;
}

/* ---------- Status badges ---------- */
.pb-dt__status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pb-dt__status-badge--operational {
    background-color: #102733;
    color: #10b981;
}

.pb-dt__status-badge--report-spike,
.pb-dt__status-badge--degraded,
.pb-dt__status-badge--outage {
    background-color: #261c2d;
    color: #ef4444;
}

/* ---------- Card body ---------- */
.pb-dt__card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.pb-dt__card-reports {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 14px;
}

.pb-dt__card-reports svg {
    flex-shrink: 0;
    color: #475569;
}

/* ---------- Card actions ---------- */
.pb-dt__card-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pb-dt__report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #374151;
    background-color: transparent;
    color: #d1d5db;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pb-dt__report-btn:hover {
    background-color: #1e293b;
    border-color: #475569;
    color: #ffffff;
}

.pb-dt__report-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pb-dt__details-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #137FEC !important;
    text-decoration: none !important;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.pb-dt__details-link:hover {
    color: #0f6ad4 !important;
}

.pb-dt__details-link span {
    font-size: 1rem;
    line-height: 1;
}

/* ---------- SweetAlert dark theme overrides ---------- */
.pb-dt .swal2-popup {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-radius: 16px !important;
}

.pb-dt .swal2-title {
    color: #ffffff !important;
}

.pb-dt .swal2-html-container {
    color: #94a3b8 !important;
}

/* ---------- Navbar overrides for down-timer dark page ---------- */
/* pb-down-timer.css is only enqueued on down-timer pages — no body scope needed */
.pb-lp__navbar-link,
.pb-lp__navbar-link:hover,
.pb-lp__navbar-link:focus,
.pb-lp__navbar-link.active {
    color: #fff !important;
    text-decoration: none !important;
}

.pb-lp__navbar-btn--discord {
    color: #fff !important;
}

/* ---------- Footer overrides for dark page ---------- */
body.page-template-templates\/page-pb-down-timer-php .site-footer {
    background-color: #15151f;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .pb-dt__grid-section .col-6,
    .pb-dt__grid-section .col-md-4,
    .pb-dt__grid-section .col-lg,
    .pb-dt__grid-section .col-xl {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
    }
}

@media (max-width: 991.98px) {
    .pb-dt__hero-title {
        font-size: 1.8rem;
    }

    .pb-dt__grid-section .col-6,
    .pb-dt__grid-section .col-md-4,
    .pb-dt__grid-section .col-lg,
    .pb-dt__grid-section .col-xl {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
    }
}

@media (max-width: 767.98px) {
    .pb-dt__hero-title {
        font-size: 1.5rem;
    }

    .pb-dt__hero-subtitle {
        font-size: 0.9rem;
    }

    .pb-dt__grid-section .col-6,
    .pb-dt__grid-section .col-md-4,
    .pb-dt__grid-section .col-lg,
    .pb-dt__grid-section .col-xl {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .pb-dt__card {
        padding: 14px;
    }

    .pb-dt__card-logo {
        width: 46px;
        height: 46px;
    }

    .pb-dt__card-name {
        font-size: 0.85rem;
    }

    .pb-dt__card-reports {
        font-size: 0.72rem;
    }

    .pb-dt__status-badge {
        font-size: 0.6rem;
        padding: 3px 8px;
    }

    .pb-dt__details-link {
        font-size: 0.75rem;
    }

    .pb-dt__grid-section .row {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }
}

@media (max-width: 359.98px) {
    .pb-dt__card {
        padding: 12px;
    }

    .pb-dt__card-logo {
        width: 40px;
        height: 40px;
    }

    .pb-dt__card-name {
        font-size: 0.8rem;
    }

    .pb-dt__status-badge {
        font-size: 0.55rem;
        padding: 2px 6px;
    }
}
