/* ==========================================
   Exclusive Coupons & Promo Codes - Styles
   ========================================== */

.bea-coupon-widget {
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #ECEEF4;
    padding: 24px;
    box-sizing: border-box;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

/* ----- Header ----- */
.bea-coupon-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.bea-coupon-heading {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    position: relative;
    padding-bottom: 10px;
}

.bea-coupon-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #3B82F6;
    border-radius: 2px;
}

.bea-coupon-viewall {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.bea-coupon-viewall svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.bea-coupon-viewall:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.bea-coupon-viewall:hover svg {
    transform: translateX(4px);
}

.bea-coupon-viewall:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: 2px;
}

/* ----- List ----- */
.bea-coupon-list {
    display: flex;
    flex-direction: column;
}

/* ----- Row ----- */
.bea-coupon-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bea-coupon-row:not(:last-child) {
    margin-bottom: 12px;
}

.bea-coupon-row:hover {
    background: #F8FAFC;
}

.bea-coupon-row:hover .bea-coupon-logo-img {
    transform: scale(1.05);
}

/* ----- Featured Badge ----- */
.bea-coupon-featured {
    border: 1px solid #7C3AED;
}

.bea-coupon-badge {
    position: absolute;
    top: -1px;
    left: 20px;
    background: linear-gradient(135deg, #7C3AED, #3B82F6);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 0 0 6px 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
    line-height: 1.4;
}

/* ----- Column 1: Logo ----- */
.bea-coupon-logo-wrap {
    width: 64px;
    min-width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    line-height: 0;
}

.bea-coupon-logo-wrap:empty {
    display: none;
}

.bea-coupon-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ----- Column 2: Info ----- */
.bea-coupon-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bea-coupon-store {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #7C3AED;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    line-height: 1.4;
}

.bea-coupon-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.bea-coupon-row:hover .bea-coupon-title {
    color: #7C3AED;
}

.bea-coupon-desc {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.5;
    color: #6B7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bea-coupon-expiry {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #9CA3AF;
    line-height: 1.4;
}

.bea-coupon-expiry svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    display: block;
}

/* ----- Column 3: Coupon Code ----- */
.bea-coupon-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 140px;
    height: 44px;
    border: 2px dashed #7C3AED;
    border-radius: 8px;
    background: #F0FDF4;
    color: #7C3AED;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
    position: relative;
    line-height: 1;
    box-sizing: border-box;
}

.bea-coupon-code.bea-coupon-copy {
    cursor: pointer;
    user-select: none;
}

.bea-coupon-code.bea-coupon-copy:hover {
    background: #DCFCE7;
    border-color: #6D28D9;
    color: #6D28D9;
}

.bea-coupon-code-text {
    line-height: 1;
}

.bea-coupon-copy-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.bea-coupon-copy-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.bea-coupon-copied-tip {
    display: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    color: #10B981;
    line-height: 1;
}

.bea-coupon-copied .bea-coupon-code-text,
.bea-coupon-copied .bea-coupon-copy-icon {
    display: none;
}

.bea-coupon-copied .bea-coupon-copied-tip {
    display: inline;
}

/* ----- Column 4: Button ----- */
.bea-coupon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 130px;
    height: 44px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
}

.bea-coupon-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.bea-coupon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.3);
}

.bea-coupon-btn:hover svg {
    transform: translateX(4px);
}

.bea-coupon-btn:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: 2px;
}

/* ----- Divider ----- */
.bea-coupon-divider {
    border: none;
    border-top: 1px solid #F1F5F9;
    margin: 0;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.bea-coupon-row:last-child .bea-coupon-divider {
    display: none;
}

/* ==========================================
   RTL Support
   ========================================== */
.rtl .bea-coupon-heading::after {
    left: auto;
    right: 0;
}

.rtl .bea-coupon-badge {
    left: auto;
    right: 20px;
}

.rtl .bea-coupon-viewall svg {
    transform: rotate(180deg);
}

.rtl .bea-coupon-viewall:hover svg {
    transform: rotate(180deg) translateX(4px);
}

.rtl .bea-coupon-btn svg {
    transform: rotate(180deg);
}

.rtl .bea-coupon-btn:hover svg {
    transform: rotate(180deg) translateX(4px);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1024px) {
    .bea-coupon-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .bea-coupon-logo-wrap {
        width: 56px;
        min-width: 56px;
        height: 56px;
    }

    .bea-coupon-title {
        font-size: 17px;
    }

    .bea-coupon-desc {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .bea-coupon-widget {
        padding: 16px;
    }

    .bea-coupon-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .bea-coupon-heading {
        font-size: 18px;
    }

    .bea-coupon-row {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 12px;
    }

    .bea-coupon-logo-wrap {
        width: 48px;
        min-width: 48px;
        height: 48px;
        align-self: center;
    }

    .bea-coupon-info {
        width: 100%;
    }

    .bea-coupon-title {
        font-size: 16px;
    }

    .bea-coupon-desc {
        font-size: 14px;
        margin-bottom: 0;
    }

    .bea-coupon-code {
        width: 100%;
    }

    .bea-coupon-btn {
        width: 100%;
    }
}

/* ==========================================
   Accessibility
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    .bea-coupon-row,
    .bea-coupon-logo-img,
    .bea-coupon-viewall,
    .bea-coupon-viewall svg,
    .bea-coupon-btn,
    .bea-coupon-btn svg {
        transition-duration: 0.01ms !important;
        transform: none !important;
    }
}
