/* ============================================
   CONDITIONS PAGE — Desktop + Mobile Styling
   ============================================ */

/* Desktop Status Block */
.gp-conds-status-block {
    display: inline-block;
    padding: 6px 20px;
    background: #eef7ff;
    border: 1px solid #bcd5ff;
    margin-bottom: 16px;
    color: #003366;
    font-size: 0.95rem;
    border-radius: 4px;
}

/* Desktop Table Container */
.table_container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 24px auto;
    padding: 0;
    font-size: 0.9rem;
    text-align: center;
}

/* Desktop Tables */
.table_container table {
    width: 100%;
    border-collapse: collapse;
}

.table_container th {
    background-color: #1f4056;
    color: #fff;
    padding: 8px;
    font-weight: bold;
}

.condCell {
    padding: 8px 6px;
    border-bottom: 1px solid #ddd;
}

.cond-mobile-row {
    display: none;
}

/* ============================================
   MOBILE VERSION — Replace Tables With Rows
   ============================================ */

@media (max-width: 600px) {

    /* Status block spacing */
    #gp-conds-status-wrapper {
        margin-top: 20px;
    }

    /* Global mobile font scaling */
    #gp-conds-top-table-wrapper,
    #gp-conds-bot-table-wrapper,
    .cond-mobile-row {
        display: block;
        font-size: 0.85rem;
    }

    /* 1. Force newline after "Conditions Updated:" */
    .gp-conds-updated strong::after {
        content: "\A";
        white-space: pre;
    }

    /* 2. HIDE DESKTOP TABLES ON MOBILE (THE FIX) */
    #gp-conds-top-table,
    #gp-conds-bot-table {
        display: none !important;
    }

    /* 3. Remove spacing between wrappers */
    #gp-conds-top-table-wrapper,
    #gp-conds-bot-table-wrapper {
        margin: 0;
        padding: 0;
        border: none;
    }

    #gp-conds-top-table-wrapper + #gp-conds-bot-table-wrapper {
        margin-top: 0;
        padding-top: 0;
    }

    /* --------------------------------------------
       MOBILE ROW STYLE (REPLACES TABLES)
       -------------------------------------------- */
    .cond-mobile-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 14px;
        border: 1px solid #b0c7db;
        background: #fff;
        margin: 0;
        line-height: 1.4;
    }

    /* No gaps between rows */
    .cond-mobile-row + .cond-mobile-row {
        border-top: none;
    }

    /* Labels */
    .cond-mobile-label {
        font-weight: bold;
        white-space: nowrap;
        padding-right: 10px;
        display: inline-block;
    }

    /* Values */
    .cond-mobile-value {
        text-align: right;
        flex-grow: 1;
    }

    /* 5. Remove table header rows on mobile */
    #cond-top-header,
    #cond-bot-header {
        display: none !important;
    }
}
