/* ── CM Weather Ticker ── */

.cm-ticker {
    display: none; /* hidden on mobile — shown via media query below */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    height: 36px;
    background: #111;
    border-top: 1px solid #2a2a2a;
    color: #aaa;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px 0 16px;
    transition: background 0.3s, border-color 0.3s;
}

@media ( min-width: 769px ) {
    .cm-ticker {
        display: flex;
    }

    /* Push the page footer up so the ticker doesn't cover it */
    body {
        padding-bottom: 36px;
    }
}

/* Alert state — bright red bar */
.cm-ticker--alert {
    background: #991b1b;
    border-top-color: #dc2626;
    color: #fecaca;
}

/* ── Message (left side) ── */
.cm-ticker__message {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: #e8a96e;
    white-space: nowrap;
    flex-shrink: 0;
}

.cm-ticker--alert .cm-ticker__message {
    color: #fef2f2;
}

/* ── Inner layout (right side) ── */
.cm-ticker__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: auto;
}

/* Location label */
.cm-ticker__location {
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ddd;
    flex-shrink: 0;
}

.cm-ticker--alert .cm-ticker__location {
    color: #fff;
}

/* Pipe dividers */
.cm-ticker__sep {
    color: #3a3a3a;
    flex-shrink: 0;
}

.cm-ticker--alert .cm-ticker__sep {
    color: #b91c1c;
}

/* Temperature */
.cm-ticker__temp {
    font-weight: 600;
    color: #e5e5e5;
    flex-shrink: 0;
}

.cm-ticker--alert .cm-ticker__temp {
    color: #fff;
}

/* Low/High range */
.cm-ticker__range {
    color: #888;
    flex-shrink: 0;
}

.cm-ticker--alert .cm-ticker__range {
    color: #fca5a5;
}

/* Conditions */
.cm-ticker__condition {
    color: #aaa;
    flex-shrink: 0;
}

/* Tides */
.cm-ticker__tides {
    color: #aaa;
    flex-shrink: 0;
}

/* Alert link */
.cm-ticker__alert {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    flex-shrink: 0;
}

.cm-ticker__alert:hover {
    color: #fef2f2;
}

/* ── Close button ── */
.cm-ticker__close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #555;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.cm-ticker__close:hover {
    color: #ddd;
}

.cm-ticker--alert .cm-ticker__close {
    color: #f87171;
}

.cm-ticker--alert .cm-ticker__close:hover {
    color: #fff;
}
