/* ===== FRONTEND SPECIFIC STYLES ===== */

/* Notification Bell */
.wcun-notification-bell-wrapper {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 99999;
    transition: var(--wcun-transition);
}

.wcun-bell-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--wcun-white);
    border-radius: 50%;
    box-shadow: var(--wcun-shadow);
    text-decoration: none;
    position: relative;
    transition: var(--wcun-transition);
}

.wcun-bell-link:hover,
.wcun-bell-link:focus {
    transform: scale(1.1);
    background: var(--wcun-light-gray);
    box-shadow: var(--wcun-shadow-hover);
    outline: none;
}

.wcun-bell-icon {
    font-size: 24px;
    line-height: 1;
    transition: transform 0.3s ease;
}

/* Has notifications animation */
.wcun-has-notifications .wcun-bell-link {
    background: #fff0f0;
    animation: wcun-float 3s ease-in-out infinite;
}

.wcun-has-notifications .wcun-bell-link:hover {
    background: #ffd6d6;
}

.wcun-has-notifications .wcun-bell-icon {
    animation: wcun-shake 0.5s ease-in-out infinite alternate;
}

/* Notification Badge */
.wcun-notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--wcun-notification);
    color: var(--wcun-white);
    font-size: 12px;
    font-weight: bold;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 11px;
    padding: 0 6px;
    border: 2px solid var(--wcun-white);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    animation: wcun-pulse-badge 1.5s infinite;
    z-index: 100000;
}

/* 9+ style */
.wcun-notification-badge.wcun-many-notifications {
    font-size: 11px;
    padding: 0 5px;
    min-width: 24px;
}

/* Shortcode Display */
.wcun-order-notices {
    margin: 30px 0;
    padding: 25px;
    background: var(--wcun-white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.wcun-section-title {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--wcun-dark);
    font-size: 24px;
    border-bottom: 3px solid var(--wcun-primary);
    padding-bottom: 15px;
}

.wcun-login-required,
.wcun-no-notifications {
    text-align: center;
    padding: 20px;
    color: var(--wcun-gray);
    font-style: italic;
    background: #f9f9f9;
    border-radius: 4px;
}

/* WhatsApp Button in Notices */
.wcun-notice .wcun-whatsapp-button {
    margin-top: 15px;
}

/* Notifications Container */
.wcun-notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
    max-width: 350px;
}

.wcun-notification {
    background: var(--wcun-white);
    border-left: 4px solid var(--wcun-primary);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: var(--wcun-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: wcun-slide-in 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wcun-notification.wcun-notification-success {
    border-left-color: var(--wcun-success);
}

.wcun-notification.wcun-notification-error {
    border-left-color: var(--wcun-error);
}

.wcun-notification.wcun-notification-warning {
    border-left-color: var(--wcun-warning);
}

.wcun-notification-content {
    flex: 1;
}

.wcun-notification-hiding {
    animation: wcun-slide-out 0.3s ease forwards;
}

/* ===== ANIMATIONS ===== */
@keyframes wcun-pulse-badge {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(255, 0, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

@keyframes wcun-shake {
    0% {
        transform: rotate(-15deg);
    }
    100% {
        transform: rotate(15deg);
    }
}

@keyframes wcun-float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes wcun-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes wcun-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 768px) {
    .wcun-notification-bell-wrapper {
        top: 95px;
        right: 15px;
    }
    
    .wcun-bell-link {
        width: 45px;
        height: 45px;
    }
    
    .wcun-bell-icon {
        font-size: 20px;
    }
    
    .wcun-notification-badge {
        font-size: 11px;
        min-width: 20px;
        height: 20px;
        line-height: 20px;
        top: -6px;
        right: -6px;
    }
    
    .wcun-notification-badge.wcun-many-notifications {
        font-size: 10px;
        padding: 0 4px;
        min-width: 22px;
    }
    
    .wcun-order-notices {
        padding: 20px;
        margin: 20px 0;
    }
    
    .wcun-section-title {
        font-size: 20px;
    }
}

/* Admin Bar Adjustment */
.admin-bar .wcun-notification-bell-wrapper {
    top: 132px;
}

@media (max-width: 782px) {
    .admin-bar .wcun-notification-bell-wrapper {
        top: 126px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .admin-bar .wcun-notification-bell-wrapper {
        top: 70px;
        right: 10px;
    }
    
    .wcun-bell-link {
        width: 40px;
        height: 40px;
    }
    
    .wcun-bell-icon {
        font-size: 18px;
    }
    
    .wcun-notification-badge {
        font-size: 10px;
        min-width: 18px;
        height: 18px;
        line-height: 18px;
        top: -5px;
        right: -5px;
    }
    
    .wcun-order-notices {
        padding: 15px;
        margin: 15px 0;
    }
    
    .wcun-section-title {
        font-size: 18px;
    }
    
    .wcun-notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .wcun-notification-bell-wrapper {
        top: 70px;
        right: 10px;
    }
    
    .wcun-bell-link {
        width: 35px;
        height: 35px;
    }
    
    .wcun-bell-icon {
        font-size: 16px;
    }
    
    .wcun-notification-badge {
        font-size: 9px;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        top: -4px;
        right: -4px;
        border-width: 1px;
    }
    
    .wcun-section-title {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .wcun-notification-bell-wrapper,
    .wcun-bell-link,
    .wcun-notification-badge,
    .wcun-notifications-container {
        display: none !important;
    }
    
    .wcun-order-notices {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .wcun-notice {
        border-width: 3px;
    }
    
    .wcun-button,
    .wcun-whatsapp-button {
        border-width: 2px;
    }
    
    .wcun-bell-link {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .wcun-notification-bell-wrapper,
    .wcun-bell-link,
    .wcun-bell-icon,
    .wcun-notification-badge,
    .wcun-notification {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .wcun-has-notifications .wcun-bell-link,
    .wcun-has-notifications .wcun-bell-icon {
        animation: none;
    }
    
    .wcun-notification-badge {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wcun-bell-link {
        background: #2c3338;
        color: #f0f0f1;
        border: 1px solid #3c434a;
    }
    
    .wcun-bell-link:hover {
        background: #373f46;
    }
    
    .wcun-has-notifications .wcun-bell-link {
        background: #3d1c1c;
    }
    
    .wcun-has-notifications .wcun-bell-link:hover {
        background: #4a2323;
    }
    
    .wcun-order-notices {
        background: #1d2327;
        border: 1px solid #3c434a;
    }
    
    .wcun-login-required,
    .wcun-no-notifications {
        background: #2c3338;
        color: #a7aaad;
    }
    
    .wcun-notification {
        background: #2c3338;
        border-color: #2271b1;
    }
}