/* Discount Notification System Styles */

/* Notification Banner Styles */
#discount-notification-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #6c5ce7, #74b9ff);
    color: white;
    padding: 0;
    transform: translateY(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

#discount-notification-banner.show {
    transform: translateY(0);
}

.discount-banner-content {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 15px;
}

.discount-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.discount-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.discount-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.discount-text strong {
    font-size: 16px;
    font-weight: 600;
}

.discount-text span {
    font-size: 14px;
    opacity: 0.9;
}

.verification-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.verification-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.close-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

.close-btn svg {
    width: 20px;
    height: 20px;
}

/* Modal Styles */
#discount-verification-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#discount-verification-modal.show {
    opacity: 1;
    visibility: visible;
}

#discount-verification-modal.closing {
    opacity: 0;
    visibility: hidden;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#discount-verification-modal.show .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    position: relative;
    background: linear-gradient(135deg, #6c5ce7, #74b9ff);
    color: white;
    padding: 30px;
    border-radius: 16px 16px 0 0;
    text-align: center;
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.modal-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.modal-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.modal-notice {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    margin: 20px;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 5px solid #f29009;
}

.notice-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notice-text {
    flex: 1;
    color: #2d3436;
}

.notice-text strong {
    display: block;
    margin-bottom: 5px;
    color: #2d3436;
}

.modal-details {
    padding: 0 20px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 5px solid #f29009;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.detail-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

.detail-content {
    flex: 1;
}

.detail-content strong {
    display: block;
    color: #2d3436;
    margin-bottom: 5px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 16px;
    color: #636e72;
    font-weight: 500;
}

.detail-price {
    font-size: 24px;
    font-weight: bold;
    color: #f29009;
    background: linear-gradient(135deg, #f29009, #ff8000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-verification {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #2d3436;
    background: #e9ecef;
    padding: 10px;
    border-radius: 6px;
    letter-spacing: 2px;
    display: inline-block;
    margin-top: 5px;
}

.modal-actions {
    padding: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.primary-btn, .secondary-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    min-width: 140px;
    justify-content: center;
}

.primary-btn {
    background: linear-gradient(135deg, #f29009, #ff8000);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(242, 144, 9, 0.4);
}

.secondary-btn {
    background: #636e72;
    color: white;
}

.secondary-btn:hover {
    background: #2d3436;
    transform: translateY(-2px);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .discount-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 20px 15px;
    }
    
    .discount-text {
        order: 1;
    }
    
    .verification-btn {
        order: 2;
        align-self: stretch;
        justify-content: center;
    }
    
    .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        order: 3;
    }
    
    /* Adjust body padding for mobile banner height */
    body.discount-banner-active {
        padding-top: 100px !important; /* Mobile banner is taller due to stacked layout */
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-notice,
    .modal-details,
    .modal-actions {
        padding: 15px;
    }
    
    .detail-item {
        padding: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .discount-text strong {
        font-size: 14px;
    }
    
    .discount-text span {
        font-size: 12px;
    }
    
    .verification-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-header p {
        font-size: 14px;
    }
    
    .detail-price {
        font-size: 20px;
    }
    
    .detail-verification {
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    /* Further adjust for very small screens */
    body.discount-banner-active {
        padding-top: 110px !important; /* Extra space for very small screens */
    }
}

/* Ensure banner doesn't interfere with page content */
/* Calculate banner height: padding (15px * 2) + content height (~40px) + shadow = ~70px */
body.has-discount-banner {
    padding-top: 70px;
    transition: padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern CSS approach: Push content down when banner is visible */
body:has(#discount-notification-banner.show) {
    padding-top: 70px;
    transition: padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fallback approach for all browsers */
body.discount-banner-active {
    padding-top: 70px !important;
    transition: padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}