/* ============================================================
   GLOBAL WIDGET CONTAINER
   ============================================================ */
.widget-container {
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1a3d6d;
}

/* ============================================================
   MAIN CONDITIONS (Water / Air / Wind)
   ============================================================ */
/* Desktop: make all three read as one inline sentence */
.conditions {
    display: block;          /* no flex on desktop */
    white-space: nowrap;     /* keep on one line */
    margin-bottom: 18px;
}

.conditions > div {
    display: inline;         /* inline chunks */
    padding: 0;
    margin: 0;
}

/* Desktop pipes tight between chunks */
.conditions > div:not(:last-child)::after {
    content: " | ";
    color: #1a3d6d;
    font-weight: 600;
}

/* ⭐ KEEP LABELS INLINE (DESKTOP) */
.conditions strong {
    white-space: nowrap;
}

.conditions strong,
.conditions .wind-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   HOMEPAGE TIDE TEASER TITLE
   ============================================================ */
.tide-teaser-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a3d6d;
    margin-bottom: 10px;
}

/* ============================================================
   DATE LABEL BOXES ABOVE CHART
   ============================================================ */
.date-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0 12px 0;
    gap: 10px;
}

.date-box {
    background: #eef4ff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1a3d6d;
    border: 1px solid #d0e2ff;
    flex: 1;
    text-align: center;
}

/* ============================================================
   TIDE TABLE — BLUE HEADER + WHITE FONT
   ============================================================ */
.tide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #ffffff;
}

.tide-table tr:first-child {
    background: #1a3d6d;
    color: #ffffff;
}

.tide-table th {
    padding: 10px 8px;
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
}

.tide-table td {
    padding: 8px 8px;
    vertical-align: top;
    border-bottom: 1px solid #e5e5e5;
    color: #333;
    background: #fafafa;
}

.tide-table tr:last-child td {
    border-bottom: none;
}

/* ============================================================
   NOAA WIDGET — DIVIDER ABOVE CHART
   ============================================================ */
.noaa-chart-divider {
    width: 100%;
    height: 6px;
    background: #1a3d6d;
    margin: 18px 0 12px 0;
    border-radius: 3px;
    overflow: hidden;
}

.noaa-chart-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #1a3d6d;
    margin-top: 0;
    margin-bottom: 10px;
}

/* ============================================================
   CHART WRAPPER
   ============================================================ */
.chart-wrapper {
    width: 100%;
    height: 420px;
    margin: 24px 0;
    position: relative;
}

canvas {
    display: block;
}

/* ============================================================
   UPDATED INFO + WARNINGS
   ============================================================ */
.updated-info,
.stale-warning,
.stale-critical {
    margin-top: 2px;
    margin-bottom: 0;
    line-height: 1.25;
}

.updated-info {
    color: #333;
    font-size: 0.85rem;
}

.stale-warning {
    color: #c00;
    font-size: 0.85rem;
}

.stale-critical {
    color: #b00;
    font-weight: bold;
    font-size: 0.9rem;
}

/* ============================================================
   INLINE EXTRA CONDITIONS (Pressure / Sunrise / Sunset / Moon / Updated)
   ============================================================ */
.conditions-extra-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.conditions-extra-inline .cond-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.conditions-extra-inline .separator {
    padding: 0 6px;
    color: #1a3d6d;
    font-weight: bold;
}

/* ============================================================
   MOBILE STACKING + ENHANCEMENTS
   ============================================================ */
@media (max-width: 600px) {

    /* Remove pipes on mobile */
    .conditions > div::after {
        content: none !important;
    }

    /* Mobile: restore flex cards for Water / Air / Wind */
    .conditions {
        display: flex;
        flex-direction: column;
        white-space: normal;
        gap: 14px;
        margin-bottom: 20px;
    }

    .conditions > div {
        display: flex;
        background: #f7faff;
        padding: 12px 14px;
        border-radius: 10px;
        border: 1px solid #e3ecf9;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
        font-size: 0.95rem;
        align-items: center;
        gap: 6px;
    }

    .conditions > div strong {
        white-space: nowrap;
    }

    .conditions > div strong,
    .conditions > div .wind-label {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    /* Keep Today / Tomorrow side-by-side */
    .date-labels {
        flex-direction: row;
        gap: 6px;
        margin: 16px 0;
    }

    .date-box {
        flex: 1;
        min-width: 0;
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    /* Stack the inline conditions */
    .conditions-extra-inline {
        display: flex;
        flex-direction: column;
        gap: 14px;
        line-height: 1.4;
        margin-bottom: 20px;
    }

    .conditions-extra-inline .cond-item {
        background: #f7faff;
        padding: 12px 14px;
        border-radius: 10px;
        border: 1px solid #e3ecf9;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    }

    .conditions-extra-inline .cond-item:not(:last-child) {
        border-bottom: 1px solid #d9e4f5;
    }

    .conditions-extra-inline .separator {
        display: none;
    }

    /* Highlight TODAY pill */
    .date-box:first-child {
        background: #dceaff;
        border-color: #bcd4ff;
        font-weight: 700;
        box-shadow: 0 0 8px rgba(26, 61, 109, 0.18);
    }

    /* Chart spacing on mobile */
    .noaa-chart-divider {
        margin: 20px 0 14px 0;
    }

    .chart-wrapper {
        margin: 26px 0;
    }

    .tide-table {
        margin-top: 14px;
    }
}

/* ============================================================
   BODY RESET FOR HOMEPAGE EMBED
   ============================================================ */
body {
    margin: 0;
    padding: 10px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #ffffff;
}
