/**
 * WPSell Learnly - Video Offers Styles
 *
 * @package WPSell_Learnly
 */

/* ==========================================================================
   Offer Overlay Container
   ========================================================================== */

.wpsell-offer-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.wpsell-offer-overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Fullscreen mode */
.wpsell-video-player-wrap.is-fullscreen .wpsell-offer-overlay-backdrop {
    position: fixed;
    border-radius: 0;
}

/* ==========================================================================
   Offer Overlay Content
   ========================================================================== */

.wpsell-offer-overlay {
    position: relative;
    max-width: 700px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wpsell-offer-overlay-backdrop.active .wpsell-offer-overlay {
    transform: scale(1);
}

/* ==========================================================================
   Close Button
   ========================================================================== */

.wpsell-offer-overlay-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.wpsell-offer-overlay-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.wpsell-offer-overlay-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Offer Content
   ========================================================================== */

.wpsell-offer-content {
    padding: 40px 30px 30px;
    text-align: center;
}

/* Badge */
.wpsell-offer-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--wpsell-gold);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 15px;
}

/* Heading */
.wpsell-offer-heading {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 25px 0;
    line-height: 1.3;
}

/* ==========================================================================
   Offer Card
   ========================================================================== */

.wpsell-offer-card {
    background: var(--wpsell-50);
    border-radius: var(--wpsell-radius-lg);
    overflow: hidden;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Image */
.wpsell-offer-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #e9ecef;
}

.wpsell-offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Details */
.wpsell-offer-details {
    padding: 25px;
    text-align: left;
}

/* Title */
.wpsell-offer-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

/* Excerpt */
.wpsell-offer-excerpt {
    font-size: 14px;
    color: var(--wpsell-500);
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* Price */
.wpsell-offer-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--wpsell-800);
    margin-bottom: 20px;
}

.wpsell-offer-price .price-free {
    color: #28a745;
}

.wpsell-offer-price .price-sale {
    color: #dc3545;
    margin-right: 10px;
}

.wpsell-offer-price .price-regular {
    font-size: 18px;
    color: var(--wpsell-400);
    text-decoration: line-through;
    font-weight: 400;
}

/* ==========================================================================
   CTA Button
   ========================================================================== */

.wpsell-offer-cta {
    display: inline-block;
    width: 100%;
    padding: 16px 28px;
    background: var(--wpsell-gold);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--wpsell-radius);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.wpsell-offer-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(200, 169, 81, 0.4);
    color: #fff;
}

.wpsell-offer-cta .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 5px;
}

/* ==========================================================================
   Continue Button
   ========================================================================== */

.wpsell-offer-continue {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: var(--wpsell-500);
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--wpsell-300);
    border-radius: var(--wpsell-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wpsell-offer-continue:hover {
    background: var(--wpsell-50);
    border-color: var(--wpsell-400);
    color: var(--wpsell-800);
}

/* ==========================================================================
   Offer Button in Controls
   ========================================================================== */

.wpsell-vp-offer-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    margin-right: 5px;
}

.wpsell-vp-offer-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--wpsell-radius-sm);
}

.wpsell-vp-offer-btn .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
}

/* Pulse animation for offer button */
.wpsell-vp-offer-btn::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    animation: pulse-offer 2s infinite;
}

@keyframes pulse-offer {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .wpsell-offer-overlay-backdrop {
        padding: 15px;
    }
    
    .wpsell-offer-content {
        padding: 30px 20px 20px;
    }
    
    .wpsell-offer-heading {
        font-size: 20px;
    }
    
    .wpsell-offer-image {
        height: 180px;
    }
    
    .wpsell-offer-details {
        padding: 20px;
    }
    
    .wpsell-offer-title {
        font-size: 18px;
    }
    
    .wpsell-offer-price {
        font-size: 24px;
    }
    
    .wpsell-offer-cta {
        padding: 14px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .wpsell-offer-overlay {
        max-width: 100%;
    }
    
    .wpsell-offer-content {
        padding: 25px 15px 15px;
    }
    
    .wpsell-offer-heading {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .wpsell-offer-image {
        height: 150px;
    }
    
    .wpsell-offer-details {
        padding: 15px;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .wpsell-offer-overlay {
        background: #1a1a1a;
        color: #fff;
    }
    
    .wpsell-offer-heading {
        color: #fff;
    }
    
    .wpsell-offer-card {
        background: #2a2a2a;
    }
    
    .wpsell-offer-title {
        color: #fff;
    }
    
    .wpsell-offer-excerpt {
        color: var(--wpsell-400);
    }
    
    .wpsell-offer-price {
        color: #fff;
    }
    
    .wpsell-offer-continue {
        background: transparent;
        border-color: var(--wpsell-700);
        color: var(--wpsell-400);
    }
    
    .wpsell-offer-continue:hover {
        background: #2a2a2a;
        border-color: var(--wpsell-500);
        color: #fff;
    }
}
