/**
 * BOGO Deals Frontend Styles
 * Classic Monks Plugin
 */

/* BOGO Badges */
.cm-bogo-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 10;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.cm-bogo-badge.style-banner {
    display: block;
    text-align: center;
    border-radius: 5px;
    padding: 12px;
    margin: 10px 0;
    font-size: 14px;
}

.cm-bogo-badge.style-inline {
    display: inline;
    padding: 4px 8px;
    font-size: 11px;
    margin-left: 8px;
}

/* BOGO Shop Badges */
.cm-bogo-shop-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.cm-bogo-shop-badge .cm-bogo-badge {
    margin: 0;
    animation: none;
}

/* BOGO Cart Messages */
.cm-bogo-cart-message {
    background: #f0f8ff;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    color: #2c5aa0;
    font-weight: 500;
}

.cm-bogo-cart-message.success {
    background: #f0f9ff;
    border-color: #10b981;
    color: #065f46;
}

.cm-bogo-cart-message.info {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

/* BOGO Preview */
.cm-bogo-preview {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cm-bogo-savings {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cm-bogo-savings-amount {
    font-size: 24px;
    font-weight: bold;
    color: #16a085;
}

.cm-bogo-savings-text {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cm-bogo-message {
    color: #4a5568;
    line-height: 1.5;
}

.cm-bogo-requirements {
    text-align: center;
}

.cm-bogo-requirements-title {
    font-size: 18px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 8px;
}

.cm-bogo-requirements-message {
    color: #4a5568;
    line-height: 1.5;
}

/* BOGO Popup */
.cm-bogo-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    max-width: 400px;
    width: 90%;
    opacity: 0;
    transition: all 0.3s ease;
}

.cm-bogo-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cm-bogo-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cm-bogo-popup-close:hover {
    color: #333;
}

.cm-bogo-popup-title {
    font-size: 20px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
}

.cm-bogo-popup-message {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.cm-bogo-popup-actions {
    text-align: center;
}

.cm-bogo-popup-actions .button {
    background: #4a90e2;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.cm-bogo-popup-actions .button:hover {
    background: #357abd;
    color: white;
}

/* Popup Overlay */
.cm-bogo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cm-bogo-popup-overlay.show {
    opacity: 1;
}

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(255, 107, 107, 0.5); }
    100% { box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .cm-bogo-badge {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .cm-bogo-popup {
        margin: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }
    
    .cm-bogo-preview {
        padding: 15px;
        margin: 15px 0;
    }
    
    .cm-bogo-savings-amount {
        font-size: 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cm-bogo-preview {
        background: #1a202c;
        border-color: #2d3748;
        color: #e2e8f0;
    }
    
    .cm-bogo-popup {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .cm-bogo-popup-title {
        color: #e2e8f0;
    }
    
    .cm-bogo-message,
    .cm-bogo-popup-message,
    .cm-bogo-requirements-message {
        color: #cbd5e0;
    }
}