/**
 * Version Notification Banner Styles
 *
 * CU-868hxxxx: Zero-downtime deployment notifications
 *
 * A fixed-position notification banner that appears when a new version
 * is deployed. Non-blocking and dismissible.
 */

/* Banner Container */
.version-notification {
    position: fixed;
    top: 50px;  /* Below AdminLTE header */
    left: 0;
    right: 0;
    z-index: 1040;  /* Above content, below modals (Bootstrap modal is 1050) */
    background-color: #3c8dbc;  /* Daybreak primary blue */
    color: #fff;
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(-100%);
    transition: transform 0.3s ease-out;
    display: none;
}

/* Visible state - slide in from top */
.version-notification.visible {
    display: block;
    transform: translateY(0);
}

/* Content wrapper - centers content with max width */
.version-notification-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: nowrap;
}

/* Celebration icon */
.version-notification-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

/* Main text */
.version-notification-text {
    flex: 0 1 auto;
    white-space: nowrap;
}

.version-notification-text strong {
    font-weight: 600;
}

/* Refresh Now button - yellow/warning style */
.version-notification-refresh {
    background-color: #f39c12;  /* Warning yellow */
    border-color: #e08e0b;
    color: #fff;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
    flex-shrink: 0;
}

.version-notification-refresh:hover,
.version-notification-refresh:focus {
    background-color: #e08e0b;
    color: #fff;
    text-decoration: none;
}

.version-notification-refresh:active {
    background-color: #c87f0a;
}

.version-notification-refresh i {
    margin-right: 5px;
}

/* Later button - transparent/subtle style */
.version-notification-later {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 5px 15px;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    flex-shrink: 0;
}

.version-notification-later:hover,
.version-notification-later:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    text-decoration: none;
}

.version-notification-later:active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Close button (X) */
.version-notification-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    margin-left: 10px;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.version-notification-close:hover,
.version-notification-close:focus {
    color: #fff;
    text-decoration: none;
}

/* ============================================
   Mobile Responsiveness
   ============================================ */

@media (max-width: 768px) {
    .version-notification {
        top: 45px;  /* Adjusted for mobile header height */
        padding: 10px 15px;
    }

    .version-notification-content {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .version-notification-text {
        width: 100%;
        text-align: center;
        white-space: normal;
    }

    .version-notification-refresh,
    .version-notification-later {
        padding: 8px 20px;
    }

    .version-notification-close {
        position: absolute;
        top: 8px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .version-notification-content {
        flex-direction: column;
        gap: 8px;
    }

    .version-notification-refresh,
    .version-notification-later {
        width: 100%;
        max-width: 200px;
    }
}

/* ============================================
   Accessibility - Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .version-notification {
        transition: none;
    }

    .version-notification.visible {
        transform: none;
    }
}

/* ============================================
   Print Styles - Hide banner when printing
   ============================================ */

@media print {
    .version-notification {
        display: none !important;
    }
}
