/**
 * WooCommerce Dynamic Product Offers & Announcement Bar - Frontend CSS (v2.0.0)
 * Exact 2-Tone Card Reference Layout & Custom Standalone Popups
 */

/* ==========================================================================
   Offers Wrapper & Row (Single Line Slider for Product Page Cards)
   ========================================================================== */
.wc-dpo-offers-wrapper {
    margin: 18px 0;
    clear: both;
    width: 100%;
    box-sizing: border-box;
}

.wc-dpo-above-cart {
    margin-bottom: 20px;
}

.wc-dpo-below-cart {
    margin-top: 20px;
}

.wc-dpo-offers-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 14px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.is-horizontal-slider .wc-dpo-offers-row {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.is-horizontal-slider .wc-dpo-offers-row::-webkit-scrollbar {
    height: 5px;
}

.is-horizontal-slider .wc-dpo-offers-row::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.is-horizontal-slider .wc-dpo-card {
    flex-shrink: 0;
    scroll-snap-align: start;
    min-width: 280px;
    max-width: 380px;
}

/* ==========================================================================
   Exact 2-Tone Offer Card (Matching Provided Reference Image)
   ========================================================================== */
.wc-dpo-card {
    background-color: #ffffff;
    border: 1.5px dashed #e6d3b7;
    border-radius: 16px;
    overflow: hidden !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.wc-dpo-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

/* 2-Tone Top Header: Soft Warm Beige/Cream (#fbf3e6) */
.wc-dpo-card-header {
    background-color: #fbf3e6;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(230, 211, 183, 0.4);
}

.wc-dpo-icon-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(220, 180, 130, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.wc-dpo-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #4a3525;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.3;
}

/* 2-Tone Bottom Body: Pure White (#ffffff) */
.wc-dpo-card-body {
    background-color: #ffffff;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 14px;
    color: #7a583a;
    box-sizing: border-box;
}

.wc-dpo-card-subtitle {
    font-weight: 500;
    color: #8c6239;
}

/* Coupon Badge - Transparent Underlined Text */
.wc-dpo-coupon-badge {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px;
    font-weight: 700;
    color: #6b4423 !important;
    text-decoration: underline !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.15s ease, transform 0.1s ease;
}

.wc-dpo-coupon-badge:hover,
.wc-dpo-coupon-badge:focus,
.wc-dpo-coupon-badge:active {
    background: transparent !important;
    background-color: transparent !important;
    color: #a35d1e !important;
    transform: scale(1.03);
    outline: none !important;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.wc-dpo-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1e293b;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-dpo-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Header Announcement Bar
   ========================================================================== */
.wc-dpo-announcement-bar {
    width: 100%;
    padding: 10px 15px;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    z-index: 9999;
}

.wc-dpo-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.wc-dpo-bar-slides {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-dpo-bar-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    width: 100%;
    text-align: center;
}

.wc-dpo-bar-slide.active {
    display: block;
    opacity: 1;
}

.wc-dpo-slider-prev,
.wc-dpo-slider-next {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    padding: 0 12px;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.15s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-dpo-slider-prev:hover,
.wc-dpo-slider-next:hover {
    background: transparent !important;
    opacity: 1;
    transform: scale(1.15);
}

/* ==========================================================================
   Dedicated Custom Popups (With Image Banner Support)
   ========================================================================== */
.wc-dpo-floating-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease;
}

.wc-dpo-floating-trigger:hover {
    transform: translateY(-2px) scale(1.02);
}

.wc-dpo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.wc-dpo-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    animation: wcDpoSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wcDpoSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wc-dpo-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    font-size: 24px;
    color: #0f172a;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.wc-dpo-popup-banner img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    display: block;
}

.wc-dpo-popup-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.wc-dpo-popup-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px;
    line-height: 1.5;
}

.wc-dpo-popup-coupon-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
