/* Frontend Styles - Material Design - Lightbox Mode */

/* Overlay backdrop */
.wc-product-notice-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

/* Auto-show on load */
.wc-product-notice-overlay.wc-notice-auto-show {
    animation: fadeInOverlay 0.3s ease-out forwards;
    visibility: visible;
}

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

.wc-product-notice-overlay.wc-notice-closing {
    animation: fadeOutOverlay 0.3s ease-out forwards;
}

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

/* Modal container */
.wc-product-notice-wrapper {
    position: relative;
    font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    padding: 32px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 999999;
    transform: scale(0.9) translateY(-20px);
    opacity: 0;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.wc-notice-closing .wc-product-notice-wrapper {
    animation: modalSlideOut 0.3s ease-out forwards;
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

.wc-product-notice-wrapper:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.wc-product-notice-content {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    padding-right: 40px;
}

.wc-product-notice-content p {
    margin: 0 0 12px;
}

.wc-product-notice-content p:last-child {
    margin-bottom: 0;
}

.wc-product-notice-content strong {
    font-weight: 600;
}

.wc-product-notice-content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s;
}

.wc-product-notice-content a:hover {
    opacity: 0.8;
}

/* Close Button - Lightbox Style */
.wc-product-notice-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    z-index: 10;
}

.wc-product-notice-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

.wc-product-notice-close:active {
    transform: scale(0.95);
}

.wc-product-notice-close svg {
    display: block;
    color: inherit;
    width: 20px;
    height: 20px;
}

/* Dismiss Button (for sound) */
.wc-product-notice-dismiss {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 8px 16px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
    font-family: inherit;
}

.wc-product-notice-dismiss:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wc-product-notice-dismissed .wc-product-notice-dismiss {
    opacity: 0.4;
}

/* Background Image Overlay */
.wc-product-notice-wrapper[style*="background-image"] {
    position: relative;
    background-blend-mode: overlay;
}

.wc-product-notice-wrapper[style*="background-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: inherit;
    z-index: 0;
}

.wc-product-notice-wrapper[style*="background-image"] .wc-product-notice-content,
.wc-product-notice-wrapper[style*="background-image"] .wc-product-notice-dismiss {
    position: relative;
    z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-product-notice-overlay {
        padding: 16px;
    }
    
    .wc-product-notice-wrapper {
        padding: 24px 20px;
        border-radius: 12px;
        max-width: 100%;
    }
    
    .wc-product-notice-content {
        font-size: 15px;
        padding-right: 30px;
    }
    
    .wc-product-notice-close {
        width: 36px;
        height: 36px;
        top: 12px;
        right: 12px;
    }
    
    .wc-product-notice-close svg {
        width: 18px;
        height: 18px;
    }
    
    .wc-product-notice-dismiss {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Prevent body scroll when modal is open */
body.wc-notice-modal-open {
    overflow: hidden;
}

/* Dark backgrounds - adjust buttons */
.wc-product-notice-wrapper[style*="color: #fff"] .wc-product-notice-close,
.wc-product-notice-wrapper[style*="color: rgb(255"] .wc-product-notice-close {
    background: rgba(255, 255, 255, 0.15);
}

.wc-product-notice-wrapper[style*="color: #fff"] .wc-product-notice-close:hover,
.wc-product-notice-wrapper[style*="color: rgb(255"] .wc-product-notice-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.wc-product-notice-wrapper[style*="color: #fff"] .wc-product-notice-dismiss,
.wc-product-notice-wrapper[style*="color: rgb(255"] .wc-product-notice-dismiss {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.wc-product-notice-wrapper[style*="color: #fff"] .wc-product-notice-dismiss:hover,
.wc-product-notice-wrapper[style*="color: rgb(255"] .wc-product-notice-dismiss:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .wc-product-notice-wrapper {
        animation: none;
        transition: none;
    }
    
    .wc-product-notice-dismiss {
        transition: none;
    }
}

/* Print styles */
@media print {
    .wc-product-notice-dismiss {
        display: none;
    }
}
