/**
 * Recent Updates Banner Styles
 * Navy (#001A45) and Gold (#FFC700) color scheme
 */

/* Animation keyframes */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Main banner container */
.recent-updates-banner {
    background: linear-gradient(135deg, #001A45 0%, #003d82 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 40;
    width: 100%;
}

.slide-down {
    animation: slideDown 0.5s ease-out;
}

.updates-banner-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
}

/* Desktop Layout */
.updates-desktop-layout {
    display: none;
    align-items: center;
    justify-content: space-between;
}

.updates-content-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.updates-icon-wrapper {
    background-color: #FFC700;
    border-radius: 0.5rem;
    padding: 0.5rem;
    flex-shrink: 0;
}

.updates-bell-icon {
    height: 1.5rem;
    width: 1.5rem;
    color: #001A45;
}

.updates-text {
    color: white;
}

.updates-title {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    margin-bottom: 0.125rem;
}

.updates-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.updates-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.updates-badge {
    color: #FFC700;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.updates-view-btn {
    padding: 0.375rem 1rem;
    background-color: #FFC700;
    color: #001A45;
    font-weight: 700;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.updates-view-btn:hover {
    background-color: #ffdc4e;
    transform: translateY(-1px);
}

.updates-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
}

.updates-close-btn:hover {
    color: white;
}

.updates-close-icon {
    height: 1.25rem;
    width: 1.25rem;
}

/* Mobile Layout */
.updates-mobile-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.updates-mobile-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.updates-icon-wrapper-mobile {
    background-color: #FFC700;
    border-radius: 0.25rem;
    padding: 0.375rem;
    flex-shrink: 0;
}

.updates-bell-icon-mobile {
    height: 1rem;
    width: 1rem;
    color: #001A45;
}

.updates-mobile-text {
    flex: 1;
    color: white;
}

.updates-mobile-title {
    font-weight: 700;
    font-size: 0.875rem;
    margin: 0;
    margin-bottom: 0.125rem;
}

.updates-mobile-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.updates-mobile-view {
    color: #FFC700;
    font-size: 0.75rem;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.updates-mobile-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
}

.updates-close-icon-mobile {
    height: 1rem;
    width: 1rem;
}

/* Modal Overlay */
.updates-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.updates-modal {
    background: white;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        transform: translateY(20px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

.updates-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.updates-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #001A45;
    margin: 0;
}

.updates-modal-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
}

.updates-modal-close:hover {
    color: #001A45;
}

.updates-modal-close svg {
    height: 1.25rem;
    width: 1.25rem;
}

.updates-modal-content {
    padding: 1.5rem;
}

.update-item {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.update-item:last-child {
    border-bottom: none;
}

.update-item-header {
    display: flex;
    gap: 0.75rem;
}

.update-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.update-item-details {
    flex: 1;
}

.update-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-required-badge {
    background-color: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.update-item-list {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.update-item-list li {
    position: relative;
    padding-left: 0.5rem;
    margin-bottom: 0.25rem;
}

.update-item-list li:before {
    content: "•";
    position: absolute;
    left: -0.5rem;
    color: #6b7280;
}

.update-item-list li.text-warning {
    color: #dc2626;
    font-weight: 600;
}

.update-item-list li.text-warning:before {
    content: "⚠️";
    left: -1rem;
}

.updates-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
}

.btn-primary {
    width: 100%;
    padding: 0.625rem 1.25rem;
    background-color: #001A45;
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-primary:hover {
    background-color: #003d82;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    width: 100%;
    padding: 0.625rem 1.25rem;
    background-color: #f3f4f6;
    color: #374151;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Responsive breakpoints */
@media (min-width: 640px) {
    .updates-desktop-layout {
        display: flex;
    }
    
    .updates-mobile-layout {
        display: none;
    }
    
    .updates-modal-actions {
        flex-direction: row;
    }
    
    .btn-primary, .btn-secondary {
        width: auto;
        flex: 1;
    }
}

@media (max-width: 639px) {
    .updates-banner-container {
        padding: 0.625rem 1rem;
    }
    
    .updates-modal {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
}

/* Ensure proper stacking context */
#header-placeholder {
    position: relative;
    z-index: 100;
}

.recent-updates-banner {
    position: relative;
    z-index: 40;
}

main {
    position: relative;
    z-index: 1;
}
