/* === OUTER CONTAINER — HARD CENTER EVERYTHING === */
.wa-portal {
    max-width: 1100px;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 10px 16px;
    font-family: Arial, sans-serif;
    display: block;
}

/* === CONTROLS BAR === */
.wa-controls {
    display: grid;
    grid-template-columns: 3fr 2fr 2fr;
    gap: 14px;
    margin: 0 auto 20px auto;
    width: 100%;
}

/* FORCE ALL CONTROLS TO MATCH */
.wa-controls input,
.wa-controls select {
    width: 100% !important;
    padding: 14px 16px !important;
    font-size: 16px !important;
    border: 1px solid #888 !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    color: #111 !important;
    height: 48px !important;
    line-height: 1.2 !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* DROPDOWN ARROW */
.wa-controls select {
    background-image:
        linear-gradient(45deg, transparent 50%, #111 50%),
        linear-gradient(135deg, #111 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 55%,
        calc(100% - 12px) 55%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px !important;
}

/* === LAST UPDATED (DESKTOP + MOBILE) === */
.wa-last-updated {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 12px;
}

/* === CATEGORY BLOCK === */
.wa-category {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
}

.wa-category h3 {
    text-align: center !important;
    background: #f1f1f1;
    padding: 8px 16px;
    font-size: 18px;
    margin-bottom: 6px;
    border-left: none !important;
    border-top: 4px solid #c00;
    font-weight: 800;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* =================================================
   DESKTOP ROW LAYOUT — TIGHTENED
================================================= */
.wa-row {
    display: grid;
    grid-template-columns: 260px 1fr 140px;
    column-gap: 12px;
    width: 100%;
    max-width: 1100px;
    padding: 6px 16px;
    border-bottom: 1px solid #e5e5e5;
    align-items: center;
    justify-items: stretch;
    margin-left: auto;
    margin-right: auto;
}

.wa-row:hover {
    background: #fafafa;
}

/* ORGANIZATION NAME — BOOSTED */
.wa-org {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 4px;
}

/* CUSTOM MESSAGE — BOOSTED */
.wa-custom {
    font-size: 0.97rem;
    font-weight: 500;
    color: #333;
    line-height: 1.35;
    word-break: break-word;
    overflow-wrap: break-word;
}

.wa-custom:empty {
    min-height: 1em;
}

/* LOADING */
.wa-loading {
    padding: 20px;
    text-align: center;
    font-size: 16px;
}

/* === NO CLOSINGS MESSAGE (ALL SCREENS) === */
.wa-no-closings {
    text-align: center;
    background: #f7f7f7;
    border: 1px solid #ddd;
    padding: 32px 24px;
    border-radius: 10px;
    max-width: 760px;
    margin: 40px auto;
}

.wa-no-closings h3 {
    font-size: 24px;
    margin-bottom: 14px;
}

.wa-no-closings p {
    font-size: 15px;
    color: #444;
    margin: 8px 0;
}

/* =========================
   MOBILE — CENTERED STACK
========================= */
@media (max-width: 820px) {

    .wa-controls {
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .wa-row,
    .wa-row.two-col,
    .wa-row.three-col {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 12px 12px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .wa-org {
        font-size: 1.05rem;
        font-weight: 700;
        justify-content: center;
        padding-left: 0;
    }

    .wa-custom {
        margin-top: 4px;
        font-size: 0.93rem;
        color: #444;
    }
}

/* ======================================================
   CRITICAL ALERT + STATUS COLOR CODING (ROWS ONLY)
====================================================== */

/* CRITICAL PULSE ANIMATION */
@keyframes wa-critical-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(176,0,32,0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(176,0,32,0); }
    100% { box-shadow: 0 0 0 0 rgba(176,0,32,0); }
}

/* CRITICAL ROW */
.wa-critical {
    border-left: 6px solid #b00020;
    background: #fff3f3;
    animation: wa-critical-pulse 2.4s infinite;
}

/* CRITICAL TAG */
.wa-critical-tag {
    background: #b00020;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 6px;
    margin-right: 6px;
    border-radius: 4px;
}

/* ======================================================
   NEW TAG (LEFT-SIDE)
====================================================== */
.wa-new-tag {
    background: #d60000;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 7px;
    margin-right: 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* FORCE TAGS TO LEFT */
.wa-org .wa-new-tag,
.wa-org .wa-critical-tag {
    order: -1;
}

/* === FINAL ALIGNMENT FIX — CUSTOM MESSAGES === */
.wa-custom {
    padding-left: 0;
    margin-left: 0;
    text-indent: 0;
    display: block;
    text-align: left;
    justify-self: start;
}

/* remove any leading accidental whitespace from text nodes */
.wa-custom::before {
    content: "" !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* =========================
   CATEGORY ICONS (FONT AWESOME)
========================= */

.wa-category h3::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 18px;
}

/* (We still use server-side icons, so these remain no-op or future-proof) */

/* =====================================================
   STATUS BADGES
===================================================== */

.wa-status {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
    font-weight: 900 !important;
    border-radius: 6px !important;
    white-space: normal !important;
    line-height: 1.1 !important;
    max-width: 120px;
    margin-left: auto;
    margin-right: 0;
}

/* 🔴 CLOSED */
.wa-status-CLOSED {
    background: #b00020 !important;
    color: #fff !important;
}

/* 🟠 DELAY */
.wa-status-DELAY {
    background: #f4a100 !important;
    color: #000 !important;
}

/* 🟡 EARLY */
.wa-status-EARLY {
    background: #f7d046 !important;
    color: #000 !important;
}

/* 🔵 REMOTE */
.wa-status-REMOTE {
    background: #3a7bd5 !important;
    color: #fff !important;
}

/* 🔵 ALERT (Snow Emergency, Travel Not Advised, etc) */
.wa-status-ALERT {
    background: #0d5bd7 !important;
    color: #fff !important;
}

/* ⚫ NO SERVICE */
.wa-status-NOSERVICE {
    background: #444 !important;
    color: #fff !important;
}

/* ⚪ INFO / OTHER */
.wa-status-INFO {
    background: #6b7280 !important;
    color: #fff !important;
}

/* ⚪ ISCHEDULE CHANGE */
.wa-status-CHANGE {
    background: #1f6feb;   /* clean alert blue */
    color: #fff;
}

/* 🚨 CRITICAL — BARRICADE STYLE */
.wa-status-CRITICAL {
    background: repeating-linear-gradient(
        45deg,
        #ff8c00,
        #ff8c00 14px,
        #ffffff 14px,
        #ffffff 28px
    ) !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    font-weight: 900 !important;
    text-shadow:
        -1px -1px 0 #fff,
         1px -1px 0 #fff,
        -1px  1px 0 #fff,
         1px  1px 0 #fff;
    background-size: 28px 28px;
}

.wa-row > .wa-status {
    justify-self: end !important;
}

/* ✅ FIX: Prevent NEW badge from overlapping long organization names */
.wa-org {
    display: flex;
    align-items: center;
    gap: 8px;                  /* space between name and NEW tag */
    white-space: normal;       /* allow wrapping */
    overflow: hidden;
}

.wa-org .wa-new-tag {
    flex-shrink: 0;            /* NEVER let NEW get squished or drift */
    margin-left: 6px;
}