/* =====================================================
   VSL Flash Sales & Coupons — Frontend Styles v1.0
   ===================================================== */

/* Ensure the card image container is a positioning context for the badge */
.item-media-thumb { position: relative; }

/* ---- Flash Sale Badge (listing cards) ---- */
.vsl-flash-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 3px;
    pointer-events: none;
}

.vsl-flash-badge-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #e53e3e 0%, #dd6b20 100%);
    color: #fff;
    padding: 5px 10px 5px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 1.3;
    box-shadow: 0 2px 8px rgba(229,62,62,.45);
    white-space: nowrap;
}

.vsl-flash-icon {
    font-style: normal;
    font-size: 13px;
    animation: vsl-pulse 1.4s ease-in-out infinite;
}

@keyframes vsl-pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.2); }
}

.vsl-flash-label {
    font-size: 10px;
    letter-spacing: .6px;
}

.vsl-flash-discount {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
}

.vsl-badge-timer {
    display: inline-block;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .5px;
    white-space: nowrap;
}

/* Expired state */
.vsl-flash-badge.vsl-expired .vsl-flash-badge-inner {
    background: #a0aec0;
    box-shadow: none;
}
.vsl-flash-badge.vsl-expired .vsl-flash-icon { animation: none; }
.vsl-flash-badge.vsl-expired .vsl-badge-timer { background: rgba(0,0,0,.3); }

/* ---- Flash Sale Banner (single listing) ---- */
.vsl-flash-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #c53030 0%, #c05621 100%);
    color: #fff;
    padding: 16px 22px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(197,48,48,.3);
    flex-wrap: wrap;
}

.vsl-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vsl-banner-icon {
    font-size: 28px;
    line-height: 1;
    animation: vsl-pulse 1.4s ease-in-out infinite;
}

.vsl-banner-text {}

.vsl-banner-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .85;
    margin-bottom: 2px;
}

.vsl-banner-discount {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.1;
}

.vsl-banner-right {
    text-align: right;
}

.vsl-banner-timer-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    opacity: .75;
    margin-bottom: 4px;
}

.vsl-banner-timer {
    font-size: 28px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: 1px;
}

.vsl-flash-banner.vsl-expired {
    background: #718096;
    box-shadow: none;
    opacity: .7;
}
.vsl-flash-banner.vsl-expired .vsl-banner-icon { animation: none; }

/* ---- Coupon Strip (listing cards) ---- */
.vsl-coupon-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #fffbeb;
    border-top: 2px solid #f6c90e;
    padding: 7px 12px;
    font-size: 12px;
    position: relative;
    flex-wrap: wrap;
}

.vsl-coupon-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.vsl-coupon-tag-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.vsl-coupon-code {
    font-family: monospace;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1.5px;
    color: #744210;
    background: #fef3c7;
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px dashed #d97706;
    white-space: nowrap;
}

.vsl-coupon-disc {
    font-weight: 700;
    color: #065f46;
    white-space: nowrap;
}

/* Applied state — card */
.vsl-coupon-strip.vsl-applied {
    background: #f0fdf4;
    border-top-color: #16a34a;
}

.vsl-coupon-strip.vsl-applied .vsl-coupon-code {
    color: #166534;
    background: #dcfce7;
    border-color: #22c55e;
}

.vsl-applied-price {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #166534;
    font-weight: 600;
}

/* Apply Now button */
.vsl-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: transparent;
    border: 2px solid #16a34a;
    color: #16a34a;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

.vsl-apply-btn:hover {
    background: #16a34a;
    color: #fff;
}

.vsl-apply-btn.vsl-loading {
    opacity: .65;
    pointer-events: none;
}

.vsl-apply-btn.vsl-done {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
    pointer-events: none;
}

.vsl-apply-btn.vsl-error {
    border-color: #dc2626;
    color: #dc2626;
}

/* Error message inline */
.vsl-coupon-error {
    display: block;
    width: 100%;
    font-size: 11px;
    color: #dc2626;
    font-weight: 600;
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid #fecaca;
}

/* ---- Coupon Strip (single listing) ---- */
.vsl-coupon-strip-single {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-left: 5px solid #f59e0b;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.vsl-cs-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vsl-cs-tag {
    font-size: 20px;
    flex-shrink: 0;
}

.vsl-cs-info {}

.vsl-cs-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #92400e;
    margin-bottom: 3px;
}

.vsl-cs-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vsl-cs-code {
    font-family: monospace;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 2px;
    color: #78350f;
    background: #fef3c7;
    padding: 3px 10px;
    border-radius: 4px;
    border: 1.5px dashed #d97706;
}

.vsl-cs-discount {
    font-size: 15px;
    font-weight: 700;
    color: #065f46;
}

.vsl-cs-expiry {
    font-size: 11px;
    color: #92400e;
    opacity: .75;
    margin-top: 3px;
}

.vsl-cs-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

/* Apply button — single */
.vsl-apply-btn-lg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: #16a34a;
    border: none;
    color: #fff;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    letter-spacing: .3px;
}

.vsl-apply-btn-lg:hover {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22,163,74,.3);
}

.vsl-apply-btn-lg.vsl-loading { opacity:.65; pointer-events:none; }
.vsl-apply-btn-lg.vsl-done    { background:#166534; pointer-events:none; }
.vsl-apply-btn-lg.vsl-error   { background:#dc2626; }

/* After applying — updated price block */
.vsl-applied-info {
    text-align: right;
}

.vsl-applied-orig {
    font-size: 12px;
    color: #6b7280;
    text-decoration: line-through;
}

.vsl-applied-new {
    font-size: 18px;
    font-weight: 800;
    color: #16a34a;
}

.vsl-applied-night {
    font-size: 11px;
    color: #6b7280;
}

/* Applied state — single */
.vsl-coupon-strip-single.vsl-applied {
    background: #f0fdf4;
    border-color: #22c55e;
    border-left-color: #16a34a;
}

/* Error — single */
.vsl-single-error {
    font-size: 12px;
    color: #dc2626;
    font-weight: 600;
    text-align: right;
}

/* =====================================================
   Mobile Overlay Bar — Flash Sale Pricing
   ===================================================== */

/* Sale price in mobile sticky bar — slightly smaller than desktop */
.vsl-mobile-sale-price {
    font-size: 20px;
    font-weight: 900;
    color: #111;
    line-height: 1.1;
}

.vsl-mobile-sale-price span {
    font-size: 12px;
    font-weight: 400;
    color: #888;
    margin-left: 2px;
}

/* MRP row: strikethrough + badge */
.vsl-mobile-mrp-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.vsl-mobile-mrp {
    text-decoration: line-through;
    color: #999;
    font-size: 12px;
}

.vsl-mobile-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 20px;
}

/* Timer row in mobile bar */
.vsl-mobile-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #c05621;
    font-weight: 600;
    margin-top: 2px;
}

.vsl-mobile-timer i { font-size: 11px; }

.vsl-mobile-timer .vsl-banner-timer {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    color: #c05621;
}

/* Overlay panel flash sale header */
.vsl-overlay-price-header {
    border-bottom: 1px solid #f0f0f0;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .vsl-flash-banner {
        flex-direction: column;
        text-align: center;
        padding: 14px 16px;
    }
    .vsl-banner-right { text-align: center; }
    .vsl-banner-timer { font-size: 22px; }
    .vsl-banner-discount { font-size: 18px; }

    .vsl-coupon-strip-single {
        flex-direction: column;
        align-items: flex-start;
    }
    .vsl-cs-right { align-items: flex-start; }

    .vsl-flash-badge { top: 8px; left: 8px; }
    .vsl-flash-badge-inner { font-size: 10px; padding: 4px 8px 4px 6px; }
    .vsl-badge-timer { font-size: 10px; padding: 2px 6px; }
}

/* =====================================================
   Reference-style: Compact Timer Box (single / sidebar)
   ===================================================== */

.vsl-promo-timer-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #7c2d12;
    font-weight: 600;
    line-height: 1.4;
}

.vsl-ptb-icon { font-size: 15px; flex-shrink: 0; }

.vsl-ptb-text { flex: 1; white-space: nowrap; }

.vsl-ptb-countdown {
    font-weight: 800;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    color: #c2410c;
    letter-spacing: .4px;
    white-space: nowrap;
}

.vsl-ptb-badge {
    background: #f97316;
    color: #fff;
    font-weight: 800;
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 20px;
    flex-shrink: 0;
    letter-spacing: .3px;
    white-space: nowrap;
}

/* Expired state */
.vsl-promo-timer-box.vsl-expired {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #9ca3af;
}
.vsl-promo-timer-box.vsl-expired .vsl-ptb-countdown { color: #9ca3af; }
.vsl-promo-timer-box.vsl-expired .vsl-ptb-badge { background: #d1d5db; }

/* =====================================================
   Reference-style: Promo Coupon Box (single / sidebar)
   ===================================================== */

.vsl-promo-coupon-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.vsl-pcb-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
}

.vsl-pcb-icon-wrap {
    font-size: 18px;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vsl-pcb-content { flex: 1; min-width: 0; }

.vsl-pcb-title {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
}

.vsl-pcb-sub {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
    line-height: 1.4;
}

.vsl-pcb-sub strong {
    font-family: monospace;
    font-weight: 800;
    color: #1f2937;
    background: #e5e7eb;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11.5px;
    letter-spacing: 1px;
}

/* Apply button */
.vsl-pcb-apply {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #16a34a;
    border: none;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background .15s;
    line-height: 1.4;
}
.vsl-pcb-apply:hover  { background: #15803d; }
.vsl-pcb-apply.vsl-loading { opacity: .65; pointer-events: none; }
.vsl-pcb-apply.vsl-done    { background: #166534; pointer-events: none; }
.vsl-pcb-apply.vsl-error   { background: #dc2626; }

/* Applied price row (injected by JS after success) */
.vsl-pcb-applied-price {
    padding: 8px 14px 10px;
    border-top: 1px dashed #86efac;
    font-size: 12px;
    color: #166534;
    font-weight: 600;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.vsl-pcb-applied-price .vsl-pcb-orig {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 11px;
    font-weight: 400;
}
.vsl-pcb-applied-price .vsl-pcb-new {
    color: #15803d;
    font-size: 14px;
    font-weight: 800;
}

/* Error row */
.vsl-pcb-error {
    padding: 6px 14px 10px;
    font-size: 11px;
    color: #dc2626;
    font-weight: 600;
}

/* Applied state */
.vsl-promo-coupon-box.vsl-applied {
    background: #f0fdf4;
    border-color: #86efac;
}

/* =====================================================
   Booking Sidebar — Integrated Flash Sale + Coupon Header
   ===================================================== */

.flash-sale-container {
    padding: 20px 20px 16px;
    background: #fff;
}

/* Override Homey's .sidebar-booking-module-header .block-body-sidebar rule
   which sets background-color:#232323 (dark/black) and color:#fff.
   !important is needed because Homey's rule has equal specificity and may
   load after our stylesheet in some caching configurations. */
.sidebar-booking-module .sidebar-booking-module-header .flash-sale-container {
    background-color: #fff !important;
    color: #111 !important;
}

/* "Price / Incl. of all taxes" label */
.price-label {
    font-size: 10px;
    font-weight: 600;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-bottom: 5px;
}

.price-label-tax {
    font-weight: 400;
    text-transform: none;
    color: #c5c5c5;
    margin-left: 2px;
}

/* Price row: sale price on first line, MRP + badge on second line */
.price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.price-row .item-price {
    font-size: 32px;
    font-weight: 900;
    color: #111;
    line-height: 1;
    letter-spacing: -0.5px;
    width: 100%; /* push MRP + badge to the next line */
}

.mrp-text {
    font-size: 13px;
    color: #777;
    font-weight: 500;
    flex-shrink: 0;
}

.mrp-price {
    text-decoration: line-through;
    color: #777;
    font-size: 14px;
    font-weight: 400;
}

.discount-badge {
    background: #fbbf24;
    color: #000;
    padding: 3px 10px;
    font-weight: 900;
    font-size: 12px;
    border-radius: 20px;
    letter-spacing: .3px;
    white-space: nowrap;
    text-transform: uppercase;
}

/* Night / tax label below price */
.price-subtext {
    font-size: 11px;
    color: #c0c0c0;
    margin-bottom: 14px;
    margin-top: 1px;
}

/* Promo / Coupon Box inside the booking sidebar */
.promo-coupon-box {
    background: linear-gradient(135deg, #f0f8ff 0%, #e8f3fc 100%);
    border: 1.5px dashed #7ab8e8;
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 0;
}

.promo-main {
    color: #0046be;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 1.3;
}

/* Teal circular % badge */
.promo-pct-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #0d9488;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
    flex-shrink: 0;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(13, 148, 136, .35);
}

.promo-instruction {
    font-size: 12.5px;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.5;
    padding-left: 35px; /* align under the text, past the icon */
}

/* Coupon code chip */
.promo-instruction .coupon-code {
    display: inline-block;
    font-weight: 900;
    color: #1a1a1a;
    font-family: monospace;
    letter-spacing: 2px;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* Flash sale timer row */
.flash-sale-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 500;
    color: #0277bd;
    background: #e1f5fe;
    border: 1px solid #b3e0fc;
    padding: 7px 12px;
    border-radius: 6px;
    margin-left: 0;
}

.flash-sale-timer i {
    font-size: 13px;
    flex-shrink: 0;
}

.flash-sale-timer .vsl-banner-timer {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    letter-spacing: .8px;
    font-size: 14px;
    color: #01579b;
}

/* =====================================================
   Booking Cost Breakdown — Flash Sale Discount Line
   Inherits border/font/padding from Homey's .sub-total;
   we only override the color to green.
   ===================================================== */

#homey_booking_cost li.vsl-fs-discount-line,
.payment-list ul li.vsl-fs-discount-line {
    color: #16a34a !important;
    font-weight: 700 !important;
}

/* Price span (floated right by Homey base CSS) */
#homey_booking_cost li.vsl-fs-discount-line span:not(.discount-badge),
.payment-list ul li.vsl-fs-discount-line span:not(.discount-badge) {
    color: #16a34a !important;
    font-weight: 700 !important;
}

/* Discount badge pill — keep it inline next to the label, not floated */
#homey_booking_cost li.vsl-fs-discount-line .discount-badge,
.payment-list ul li.vsl-fs-discount-line .discount-badge {
    float: none !important;
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    font-size: 11px;
    padding: 2px 8px;
}

/* Security deposit "payable at check-in" note */
#homey_booking_cost li.vsl-deposit-note,
.payment-list ul li.vsl-deposit-note {
    font-size: 11.5px !important;
    color: #888 !important;
    font-style: italic;
    font-weight: 400 !important;
    padding-top: 0 !important;
    padding-bottom: 8px !important;
    margin-top: -8px;
    border: none !important;
}
