/* -------------------------------------------------------------------------- */
/* Rate Plan Selection UI - V6 (Header + 2 Col Body)                          */
/* -------------------------------------------------------------------------- */

.room-detail__rate-plans-section {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    width: 100%;
}

.rate-plans-container {
    display: flex;
    flex-direction: column;
    /* gap: 1rem; */
}

/* Button Base Style */
/* Button Base Style */
/* Button Base Style */
/* Button Base Style */
.btn-view-more-rates {
    width: 100%;
    /* Opaque background to cover the center of the pseudo-element */
    background: color-mix(in srgb, var(--brand-primary-color, #c4a058) 5%, white); 
    color: var(--brand-primary-color, #c4a058);
    font-weight: 700;
    padding: 0.5rem;
    border-radius: 4px; /* Matches inner content radius */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    
    /* Remove static border, border is now the pseudo-element */
    border: none;
    position: relative;
    /* Isolate stacking context so pseudo-element stays behind */
    isolation: isolate;
    z-index: 1;
    /* Create space for the border */
    margin: 1px; 
    width: calc(100% - 2px);
}

/* The Moving Gradient Border */
.btn-view-more-rates::before {
    content: "";
    position: absolute;
    inset: -2px; /* Thickness of the border */
    z-index: -1;
    border-radius: 6px; /* Slightly larger than button radius */
    
    /* Soft, professional gradient using brand color mix */
    /* Soft, linear sweep gradient instead of conic fan */
    background: linear-gradient(
        115deg,
        transparent 20%,
        color-mix(in srgb, var(--brand-primary-color, #c4a058) 40%, transparent) 50%,
        transparent 80%
    );
    background-size: 300% 300%;
    
    animation: rotate-border 3s linear infinite;
}

/* Inner white/tint background to hide the center of the gradient */
.btn-view-more-rates::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 4px;
    background: color-mix(in srgb, var(--brand-primary-color, #c4a058) 5%, white);
}

.btn-view-more-rates i {
    transition: transform 0.2s ease;
}

/* Hover State: Minimal Interaction */
#btn-view-more-rates:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    /* No color changes, just subtle lift */
}

#btn-view-more-rates:hover i {
    transform: scale(1.05);
}

@keyframes rotate-border {
    0% { background-position: 100% 0%; }
    100% { background-position: 0% 100%; }
}

#btn-view-more-rates:hover i {
    transform: scale(1.05);
    color: var(--brand-primary-color, #c4a058) !important;
}


/* Card Container */
.rate-plan-card {
    background: var(--background-tertiary, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--border-radius-secondary, 10px);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
    margin-bottom: 0.65rem; /* Reduced from 0.75rem */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    
    /* Prevent excessive stretching */
    margin-inline: auto;
}

.rate-plan-card:hover {
    border-color: var(--brand-primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* Selected State - Significantly lighter background */
.rate-plan-card.is-selected {
    background-color: color-mix(in srgb, var(--brand-primary-color, #00B09B) 4%, white);
    border: 2px solid var(--brand-primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.rate-plan-card__content {
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.25rem; /* Balanced padding for more breathing room */
    gap: 0.9rem; /* Increased from 0.75rem */
}

/* ROW 1: Header */
.rate-plan-card__header-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding-bottom: 0.7rem; /* More space below title */
    border-bottom: 1px solid color-mix(in srgb, var(--border-color, #e5e7eb) 40%, transparent);
    gap: 0.75rem;
}

.rate-plan-card__radio-indicator {
    font-size: 1.2rem; /* Scaled down */
    color: var(--border-color, #d1d5db);
}

.is-selected .rate-plan-card__radio-indicator {
    color: var(--brand-primary-color);
}

.rate-plan-card__title {
    font-size: 1.05rem; /* Slightly smaller */
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.2;
    flex: 1;
}

/* Badge Styles */
.rate-plan-card__badge-best {
    background: var(--brand-primary-color);
    color: white;
    font-size: 0.65rem; /* Compact badge */
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    letter-spacing: 0.025em;
}

/* ROW 2: Body */
.rate-plan-card__body-row {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Better alignment for compact look */
    width: 100%;
    gap: 1rem;
}

/* Column 1: Details */
.rate-plan-card__col-details {
    flex: 1;
}

.rate-plan-card__info-group {
    display: flex;
    flex-direction: row; /* Horizontal for compact look */
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rate-plan-card__info-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem; /* Increased from 0.4rem */
    font-size: 0.85rem; /* Better legibility */
    font-weight: 500;
    padding: 0.35rem 0.85rem; /* More balanced padding */
    border-radius: 6px; /* Slightly smoother */
    background: color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.meal-plan-badge { color: var(--text-secondary); }
.meal-plan-badge i { color: var(--brand-primary-color); }

.policy-badge { font-weight: 600; }
.policy-badge--success { background: #ecfdf5; color: #059669; }
.policy-badge--danger { background: #fef2f2; color: #dc2626; }

/* Column 2: Price & Action */
.rate-plan-card__col-price {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    min-width: fit-content;
}

.price-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 0.15rem;
}

.price-stack__original {
    font-size: 0.85rem;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: line-through;
    text-decoration-color: #ef4444;
    margin-bottom: 2px;
}

.price-stack__base {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Compact Summary Line: "2 Beds × ₹1,000 + Extras" */
.price-stack__summary-line {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* Inline Discount Chip */
.price-stack__discount-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 0.1rem 0.5rem;
    white-space: nowrap;
    align-self: flex-end;
}

.price-stack__discount-chip i {
    font-size: 0.6rem;
}

/* Final Price Row (strikethrough + final side-by-side) */
.price-stack__final-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    justify-content: flex-end;
}

.price-stack__final {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-secondary);
    line-height: 1;
}

/* Tax Note */
.price-stack__tax-note {
    font-size: 0.68rem;
    font-weight: 400;
    color: #94a3b8;
    white-space: nowrap;
}

.rate-plan-card__select-btn {
    padding: 0.5rem 1.75rem; /* Balanced button size */
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--border-radius-primary);
    background: transparent;
    color: var(--brand-primary-color);
    border: 1.5px solid var(--brand-primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.rate-plan-card:hover .rate-plan-card__select-btn {
    background: var(--brand-primary-color);
    color: white;
}

.rate-plan-card.is-selected .rate-plan-card__select-btn {
    background: var(--brand-primary-color);
    color: white;
    border-color: transparent;
}

/* RESPONSIVE */
@media (max-width: 640px) {
    .rate-plan-card__body-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .rate-plan-card__col-price {
        width: 100%;
        padding-top: 0.75rem;
        border-top: 1px dashed var(--border-color);
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
        justify-content: space-between;
    }

    .price-stack {
        align-items: flex-start;
        text-align: left;
    }

    .price-stack__discount-chip {
        align-self: flex-start;
    }

    .price-stack__final-row {
        justify-content: flex-start;
    }

    .price-stack__final {
        font-size: 1.4rem;
    }

    .rate-plan-card__select-btn {
        min-width: 100px;
        text-align: center;
        padding: 0.65rem 1.5rem;
    }
}

/* ========================================
   Complimentary Guest Badge (Theme-Adaptive)
   ======================================== */
.complimentary-badge {
    background: color-mix(in srgb, var(--text-success, #16a34a) 8%, transparent) !important;
    color: var(--text-success, #16a34a) !important;
    border: none !important; /* Seamless informational flow */
    font-weight: 500 !important; /* Harmonized informational weight */
}

.complimentary-badge i {
    color: var(--text-success, #16a34a) !important;
}
