/**
 * Coupon/Betslip Popup Styles
 *
 * @package Odds_Comparison
 * @since 1.0.0
 */

/* =====================================================
   OVERLAY BACKDROP
   ===================================================== */

.oc-coupon-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.oc-coupon-popup-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   POPUP BOX
   ===================================================== */

.oc-coupon-popup {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.oc-coupon-popup-overlay.active .oc-coupon-popup {
    transform: translateY(0);
}

/* =====================================================
   HEADER
   ===================================================== */

.oc-coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.oc-coupon-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.oc-coupon-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
}

.oc-coupon-label {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.oc-coupon-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.2s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oc-coupon-close:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

/* =====================================================
   CONTENT AREA
   ===================================================== */

.oc-coupon-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Empty State */
.oc-coupon-empty {
    text-align: center;
    padding: 40px 20px;
}

.oc-empty-icon {
    color: #bdc3c7;
    margin-bottom: 16px;
}

.oc-coupon-empty h3 {
    margin: 0 0 8px;
    color: #2c3e50;
    font-size: 18px;
}

.oc-coupon-empty p {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
}

/* Current Bets */
.oc-coupon-bets {
    margin-bottom: 20px;
}

/* Bookmaker Options */
.oc-coupon-bookmakers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.oc-bookmaker-option {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.oc-bookmaker-option:hover {
    border-color: #3498db;
}

.oc-bookmaker-option.oc-current-bookmaker {
    border-color: #27ae60;
    background: #f0fff4;
}

.oc-bookmaker-header {
    padding: 12px 16px;
}

.oc-bookmaker-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oc-bookmaker-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
}

.oc-bookmaker-details {
    flex: 1;
}

.oc-bookmaker-name {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 4px;
}

.oc-bet-calculation {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #7f8c8d;
    flex-wrap: wrap;
}

.oc-bet-calculation strong {
    color: #2c3e50;
    font-weight: 600;
}

.oc-bet-alternative {
    font-size: 12px;
    color: #7f8c8d;
    margin-right: 4px;
}

.oc-bookmaker-option button {
    width: 100%;
    padding: 10px 16px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-top: 1px solid #e0e0e0;
}

.oc-bet-with-bookmaker {
    background: #27ae60;
    color: #fff;
}

.oc-bet-with-bookmaker:hover {
    background: #219a52;
}

.oc-register-bookmaker {
    background: #3498db;
    color: #fff;
}

.oc-register-bookmaker:hover {
    background: #2980b9;
}

/* =====================================================
   ACTIONS
   ===================================================== */

.oc-coupon-actions {
    padding: 16px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.oc-clear-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.oc-clear-all-btn:hover {
    background: #e74c3c;
    color: #fff;
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */

.oc-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #2c3e50;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.oc-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.oc-toast.success {
    background: #27ae60;
}

.oc-toast.error {
    background: #e74c3c;
}

.oc-toast.warning {
    background: #f39c12;
}

/* =====================================================
   RESPONSIVE STYLES
   ===================================================== */

@media (max-width: 600px) {
    .oc-coupon-popup {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
    }

    .oc-coupon-popup-overlay.active .oc-coupon-popup {
        transform: translateY(0);
    }

    .oc-coupon-header {
        padding: 12px 16px;
    }

    .oc-coupon-label {
        font-size: 14px;
    }

    .oc-coupon-content {
        padding: 16px;
    }

    .oc-bet-calculation {
        flex-direction: column;
        gap: 4px;
    }

    .oc-bookmaker-info {
        flex-wrap: wrap;
    }

    .oc-toast {
        width: 90%;
        text-align: center;
        bottom: 16px;
    }
}

@media (max-width: 400px) {
    .oc-coupon-count {
        min-width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .oc-coupon-label {
        font-size: 13px;
    }

    .oc-bookmaker-logo {
        width: 32px;
        height: 32px;
    }

    .oc-bookmaker-name {
        font-size: 13px;
    }
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

@keyframes ocSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ocFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.oc-coupon-bets .oc-bet-item {
    animation: ocSlideUp 0.3s ease forwards;
}

.oc-bookmaker-option {
    animation: ocFadeIn 0.3s ease forwards;
}

