/**
 * Trail Alerts Styles — ATVCEO Child Theme
 * File: /wp-content/themes/prespa-pro-child/css/trail-alerts.css
 */

/* ═══════════════════════════════════════════════════════
   SITE-WIDE BANNER
   ═══════════════════════════════════════════════════════ */

.atvceo-alert-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    position: relative;
    z-index: 9999;
    animation: atvceo-slide-down 0.35s ease;
}

@keyframes atvceo-slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Type variants */
.atvceo-alert-banner--closed {
    background: var(--alert-closed-bg, #7f1d1d);
    border-bottom: 2px solid var(--alert-closed-border, #ef4444);
    color: #fecaca;
}
.atvceo-alert-banner--caution {
    background: var(--alert-caution-bg, #78350f);
    border-bottom: 2px solid var(--alert-caution-border, #f59e0b);
    color: #fde68a;
}
.atvceo-alert-banner--info {
    background: var(--alert-info-bg, #1e3a5f);
    border-bottom: 2px solid var(--alert-info-border, #3b82f6);
    color: #bfdbfe;
}
.atvceo-alert-banner--open {
    background: var(--alert-open-bg, #14532d);
    border-bottom: 2px solid var(--alert-open-border, #22c55e);
    color: #bbf7d0;
}

.atvceo-alert-banner__icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
}

.atvceo-alert-banner__body {
    flex: 1;
    min-width: 0;
}

.atvceo-alert-banner__label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 2px;
}

.atvceo-alert-banner__date {
    font-size: 11px;
    opacity: 0.5;
    margin-left: auto;
    white-space: nowrap;
    padding: 0 16px;
}

.atvceo-alert-banner__close {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: inherit;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
    padding: 0;
    line-height: 1;
}

.atvceo-alert-banner__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ═══════════════════════════════════════════════════════
   ALERTS SECTION (shortcode output)
   ═══════════════════════════════════════════════════════ */

.atvceo-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.atvceo-alerts-empty {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    padding: 24px 0;
    text-align: center;
}

/* Alert Card */
.atvceo-alert-card {
    display: grid;
    grid-template-columns: 5px 56px 1fr auto;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.18s, transform 0.18s;
}

.atvceo-alert-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

/* Colour stripe */
.atvceo-alert-card__stripe {
    align-self: stretch;
}
.atvceo-alert-card--closed  .atvceo-alert-card__stripe { background: #ef4444; }
.atvceo-alert-card--caution .atvceo-alert-card__stripe { background: #f59e0b; }
.atvceo-alert-card--info    .atvceo-alert-card__stripe { background: #3b82f6; }
.atvceo-alert-card--open    .atvceo-alert-card__stripe { background: #22c55e; }

/* Icon */
.atvceo-alert-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    padding: 18px 8px;
    align-self: center;
}

/* Body */
.atvceo-alert-card__body {
    padding: 16px 20px;
}

.atvceo-alert-card__type {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.atvceo-alert-card--closed  .atvceo-alert-card__type { color: #ef4444; }
.atvceo-alert-card--caution .atvceo-alert-card__type { color: #f59e0b; }
.atvceo-alert-card--info    .atvceo-alert-card__type { color: #3b82f6; }
.atvceo-alert-card--open    .atvceo-alert-card__type { color: #22c55e; }

.atvceo-alert-card__title {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.15;
    margin-bottom: 5px;
    color: #fff;
}

.atvceo-alert-card__message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.55;
}

/* Meta */
.atvceo-alert-card__meta {
    padding: 16px 20px 16px 8px;
    text-align: right;
    white-space: nowrap;
    align-self: center;
}

.atvceo-alert-card__date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 5px;
}

.atvceo-alert-card__region {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

@media ( max-width: 768px ) {

    .atvceo-alert-banner {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .atvceo-alert-banner__date {
        display: none; /* hide date on mobile to save space */
    }

    .atvceo-alert-card {
        grid-template-columns: 5px 44px 1fr;
        grid-template-rows: auto auto;
    }

    .atvceo-alert-card__meta {
        grid-column: 3;
        grid-row: 2;
        text-align: left;
        padding: 0 20px 14px;
        display: flex;
        align-items: center;
        gap: 10px;
        white-space: normal;
    }

    .atvceo-alert-card__stripe {
        grid-row: 1 / 3;
    }

    .atvceo-alert-card__icon {
        grid-row: 1 / 3;
        align-self: flex-start;
        padding-top: 16px;
    }
}
