/**
 * China Site Redirect Notification Bar Styles
 * Design concept: Elegant notification bar sliding from top, consistent with site design
 */

/* Notification container */
.china-redirect-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Show state */
.china-redirect-notification.show {
    transform: translateY(0);
}

/* Notification content container */
.notification-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #eff4ff 0%, #fdfdff 50%, #e3ecff 100%);
    border-bottom: 1px solid rgba(15, 99, 238, 0.12);
    position: relative;
}

/* Dark mode background */
@media (prefers-color-scheme: dark) {
    .notification-content {
        background: linear-gradient(135deg, #1a1d2e 0%, #0f1117 50%, #1a1d2e 100%);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Left text area */
.notification-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    flex-wrap: nowrap;
}

/* Globe icon */
.notification-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

/* Notification message */
.notification-message {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #262626;
    text-align: center;
}

@media (prefers-color-scheme: dark) {
    .notification-message {
        color: #fafafa;
    }
}

/* Common button styles */
.notification-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    outline: none;
}

.notification-btn:focus-visible {
    outline: 2px solid rgba(15, 99, 238, 0.5);
    outline-offset: 2px;
}

/* Primary button (Visit China Site) - Blue */
.notification-btn-primary {
    background: linear-gradient(135deg, #0f63ee 0%, #0b4fb8 100%);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(15, 99, 238, 0.2);
}

.notification-btn-primary:hover {
    background: linear-gradient(135deg, #0b4fb8 0%, #094291 100%);
    box-shadow: 0 4px 8px rgba(15, 99, 238, 0.3);
    transform: translateY(-1px);
}

.notification-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(15, 99, 238, 0.2);
}

/* Secondary button (Stay Here) - Gray */
.notification-btn-secondary {
    background: #ffffff;
    color: #262626;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.notification-btn-secondary:hover {
    background: #fafafa;
    border-color: #d4d4d4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.notification-btn-secondary:active {
    background: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
    .notification-btn-secondary {
        background: #262626;
        color: #fafafa;
        border-color: #404040;
    }

    .notification-btn-secondary:hover {
        background: #404040;
        border-color: #525252;
    }

    .notification-btn-secondary:active {
        background: #171717;
    }
}

/* Close button */
.notification-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    color: #737373;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #262626;
}

.notification-close:active {
    background: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
    .notification-close {
        color: #a1a1a1;
    }

    .notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fafafa;
    }

    .notification-close:active {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Mobile responsive */
@media (max-width: 640px) {
    .notification-content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.625rem;
        padding: 0.875rem 1rem;
    }

    .notification-icon {
        font-size: 1.25rem;
    }

    .notification-message {
        font-size: 0.875rem;
    }

    .notification-main {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.375rem;
    }

    .notification-btn {
        width: auto;
        min-width: auto;
        justify-content: center;
    }

    /* Close button positioned at top-right on mobile */
    .notification-close {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        transform: none;
    }
}

/* Medium screen responsive */
@media (min-width: 641px) and (max-width: 1024px) {
    .notification-message {
        font-size: 0.875rem;
    }

    .notification-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }
}

/* Accessibility: Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .china-redirect-notification,
    .notification-btn,
    .notification-close {
        transition: none;
    }

    .notification-btn:hover,
    .notification-btn-primary:hover {
        transform: none;
    }
}

/* Hide notification when printing */
@media print {
    .china-redirect-notification {
        display: none !important;
    }
}
