/**
 * NW Site Notices - Frontend Styles
 */

/* Container */
.nw-site-notices-container {
    position: relative;
    z-index: 9999;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Notice card */
.nw-site-notice {
    display: flex;
    align-items: flex-start;
    padding: 14px 20px;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.nw-site-notice + .nw-site-notice {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Icon */
.nw-notice-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-right: 14px;
    margin-top: 1px;
}

.nw-notice-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Content */
.nw-notice-content {
    flex: 1;
    min-width: 0;
}

.nw-notice-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.nw-notice-description {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.9;
}

.nw-notice-description a {
    color: inherit;
    text-decoration: underline;
}

.nw-notice-description a:hover {
    text-decoration: none;
}

/* Dismiss button */
.nw-notice-dismiss {
    flex-shrink: 0;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 4px;
    cursor: pointer;
    opacity: 0.5;
    margin-left: 14px;
    font-size: 20px;
    line-height: 1;
    transition: opacity 0.2s;
}

.nw-notice-dismiss:hover,
.nw-notice-dismiss:focus,
.nw-notice-dismiss:active {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none;
    opacity: 1;
}

/* Color variants */
.nw-notice-blue {
    background: linear-gradient(135deg, #e7f3ff 0%, #d0e7ff 100%);
    border-color: #0073aa;
    color: #004085;
}

.nw-notice-blue .nw-notice-dismiss {
    color: #004085;
}

.nw-notice-green {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
    color: #155724;
}

.nw-notice-green .nw-notice-dismiss {
    color: #155724;
}

.nw-notice-yellow {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe9a0 100%);
    border-color: #ffc107;
    color: #856404;
}

.nw-notice-yellow .nw-notice-dismiss {
    color: #856404;
}

.nw-notice-red {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    color: #721c24;
}

.nw-notice-red .nw-notice-dismiss {
    color: #721c24;
}

.nw-notice-purple {
    background: linear-gradient(135deg, #e8e0f0 0%, #dcd0e8 100%);
    border-color: #6f42c1;
    color: #432874;
}

.nw-notice-purple .nw-notice-dismiss {
    color: #432874;
}

.nw-notice-orange {
    background: linear-gradient(135deg, #ffe5cc 0%, #ffd4a8 100%);
    border-color: #fd7e14;
    color: #8a4500;
}

.nw-notice-orange .nw-notice-dismiss {
    color: #8a4500;
}

.nw-notice-gray {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #6c757d;
    color: #383d41;
}

.nw-notice-gray .nw-notice-dismiss {
    color: #383d41;
}

/* Animations */
.nw-notice-dismissing-slide {
    animation: nw-slide-out 0.3s ease-out forwards;
}

.nw-notice-dismissing-fade {
    animation: nw-fade-out 0.3s ease-out forwards;
}

@keyframes nw-slide-out {
    0% {
        transform: translateX(0);
        opacity: 1;
        max-height: 200px;
    }
    50% {
        transform: translateX(100%);
        opacity: 0;
        max-height: 200px;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin: 0;
    }
}

@keyframes nw-fade-out {
    0% {
        opacity: 1;
        max-height: 200px;
    }
    50% {
        opacity: 0;
        max-height: 200px;
    }
    100% {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin: 0;
    }
}

/* Responsive */
@media screen and (max-width: 600px) {
    .nw-site-notice {
        padding: 12px 16px;
    }

    .nw-notice-icon {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }

    .nw-notice-title {
        font-size: 14px;
    }

    .nw-notice-description {
        font-size: 13px;
    }

    .nw-notice-dismiss svg {
        width: 16px;
        height: 16px;
    }
}
