/* ==========================================================================
   PLAN YOUR TRIP SHOWCASE (plan.css)
   ========================================================================== */

/* Universal Reset Safeguard */
.plan-showcase,
.plan-showcase *,
.plan-showcase *::before,
.plan-showcase *::after {
    box-sizing: border-box;
}

.plan-showcase {
    background-color: #f8fafc;
    /* Uses calculated header height offset minus 80px */
    padding-top: calc(var(--header-height, 108px) - 80px) !important;
    padding-bottom: 24px;
    color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: left;
    width: 100%;
    min-height: calc(100vh - var(--header-height, 108px));
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.plan-showcase .container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: left;
    width: 100%;
}

/* Left-Aligned "Back to Home" Button */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: none;
    color: #c25e00;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0 !important;
    margin-bottom: 6px !important;
    padding: 0;
    text-align: left !important;
    transition: color 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
    .btn-back:hover {
        color: #9a4800;
        transform: translateX(-3px);
    }
}

/* Centered Compact Section Header */
.section-header {
    margin-bottom: 16px !important;
    text-align: center !important;
}

.section-header .eyebrow {
    display: block;
    text-align: center !important;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #d97706;
    margin-bottom: 4px !important;
    text-transform: uppercase;
}

.section-header h2 {
    text-align: center !important;
    font-size: clamp(1.4rem, 2.5vw, 1.75rem) !important;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

/* 3-Column Layout with Expanded Height & Spacing */
.plan-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 16px;
    align-items: stretch;
}

.essential-steps-card, 
.plan-calculator-card, 
.plan-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 18px 20px 18px !important; /* Increased padding for height */
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    min-height: 500px; /* Increased Card Height */
    text-align: left !important;
    overflow: hidden;
}

/* Highlight Cost Estimator Card with Subtle Amber Border */
.plan-calculator-card {
    border: 1.5px solid #fde68a;
    background-color: #fffdfa;
}

/* ==========================================================================
   FLUSH SOLID DARK BANNER HEADERS
   ========================================================================== */

.essential-steps-card h3,
.plan-calculator-card h3,
.plan-form-card h3 {
    background-color: #1e293b !important;
    color: #ffffff !important;
    text-align: center !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    margin: -18px -18px 16px -18px !important; /* Matches increased card padding */
    padding: 12px 14px !important;
    border-radius: 0 !important;
    border-bottom: none !important;
    line-height: 1.3;
}

/* Dynamic Alert Banner Styling */
.booking-alert {
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: left !important;
}

.booking-alert.alert-success {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.booking-alert.alert-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Essential Travel Steps - Balanced Spacing */
.essential-steps-card,
.essential-steps-card .steps-list,
.essential-steps-card .step-item,
.essential-steps-card .step-content,
.essential-steps-card .step-content strong,
.essential-steps-card .step-content p {
    text-align: left !important;
}

.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.step-item {
    margin-bottom: 12px !important;
}

.step-content strong {
    color: #0f172a;
    display: block;
    font-size: 0.88rem !important;
    font-weight: 700;
    margin-bottom: 4px !important;
}

.step-content p {
    font-size: 0.8rem !important;
    color: #64748b;
    margin: 0;
    line-height: 1.4 !important;
}

/* Form Styling - Expanded Height & Clean Alignment */
.plan-form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    text-align: left !important;
}

.plan-form .form-group {
    margin-bottom: 8px !important;
    text-align: left !important;
}

.plan-form .form-group-row {
    display: flex;
    gap: 8px !important;
    align-items: flex-start;
    text-align: left !important;
}

.flex-1 { flex: 1; min-width: 0; }
.flex-2 { flex: 2; min-width: 0; }

.plan-form .form-group-row.three-cols {
    display: flex;
    gap: 6px !important;
    align-items: flex-start;
}

.plan-form .form-group-row.three-cols > div {
    flex: 1;
    min-width: 0;
    text-align: left !important;
}

/* Form Labels */
.plan-form label,
.form-group-title {
    display: block;
    text-align: left !important;
    font-size: 0.64rem !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
    margin-bottom: 3px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.section-sub-label {
    text-align: left !important;
    font-size: 0.75rem !important;
    text-transform: none !important;
    font-weight: 600 !important;
    color: #334155 !important;
    letter-spacing: normal !important;
}

/* Inputs (Increased Height for Better Touch & Visual Balance) */
.plan-form input[type="text"],
.plan-form input[type="email"],
.plan-form input[type="number"],
.plan-form select {
    width: 100%;
    height: 36px !important;
    padding: 0 10px !important;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    color: #1e293b;
    background-color: #ffffff;
    text-align: left !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

@media (min-width: 769px) {
    .plan-form input[type="text"],
    .plan-form input[type="email"],
    .plan-form input[type="number"],
    .plan-form select {
        font-size: 0.82rem !important;
    }
}

.plan-form input:focus,
.plan-form select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
    outline: none;
}

/* Compact Cost Breakdown Area */
.cost-summary-box {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px !important;
    margin-top: 10px !important;
    text-align: left !important;
}

.cost-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem !important;
    color: #475569;
    margin-bottom: 5px !important;
    text-align: left !important;
}

.cost-line strong {
    color: #0f172a;
}

.cost-line.total-line {
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px !important;
    margin-top: 6px !important;
    font-size: 0.9rem !important;
    font-weight: 700;
    color: #0f172a;
}

.total-amount-green {
    color: #059669 !important;
    font-size: 1.1rem !important;
    font-weight: 800;
}

.cost-note {
    font-size: 0.7rem !important;
    font-style: italic;
    color: #94a3b8;
    margin: 6px 0 0 0 !important;
    line-height: 1.3;
    text-align: left !important;
}

/* ==========================================================================
   INTEREST CHIPS (FIT & TEXT OVERFLOW FIX)
   ========================================================================== */

.interest-chips-group {
    display: flex;
    gap: 4px; /* Reduced gap to allow all items to sit side-by-side */
    margin-top: 4px;
    margin-bottom: 6px;
    width: 100%;
}

.chip-item {
    flex: 1 1 0; /* Ensures all items scale evenly without shrinking out */
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chip-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.chip-item label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 36px !important; /* Increased height */
    padding: 2px 2px !important; /* Compressed horizontal padding */
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    text-align: center;
    
    /* Typography Adjusted to Fit Long Text Perfectly */
    font-size: 0.58rem !important;
    font-weight: 800 !important;
    letter-spacing: 0px !important;
    line-height: 1.1 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    white-space: normal !important; /* Allows two-line wrap if necessary on small screens */
    word-break: break-word !important;
    margin-bottom: 0 !important;
}

@media (hover: hover) {
    .chip-item label:hover {
        border-color: #94a3b8;
        background-color: #f8fafc;
    }
}

.chip-item input[type="checkbox"]:checked + label {
    background: #fffbeb !important;
    border: 1.5px solid #d97706 !important;
    color: #b45309 !important;
    box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.15);
}

/* Compact Action Buttons */
.btn {
    height: 40px !important;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

.btn-primary,
.btn-burgundy {
    background: #800020;
    color: #ffffff;
}

@media (hover: hover) {
    .btn-primary:hover,
    .btn-burgundy:hover {
        background: #66001a;
    }
}

.btn-block {
    width: 100%;
    margin-top: 10px !important;
}

/* Responsive Grid Rules */
@media screen and (max-width: 1024px) {
    .plan-showcase {
        padding-top: calc(var(--header-height, 90px) + 12px) !important;
        min-height: auto;
    }

    .plan-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .essential-steps-card, 
    .plan-calculator-card, 
    .plan-form-card {
        min-height: auto;
    }

    .interest-chips-group {
        flex-wrap: wrap;
    }

    .chip-item {
        flex: 1 1 calc(33.333% - 4px);
    }
}

@media screen and (max-width: 640px) {
    .plan-showcase .container {
        padding: 0 12px;
    }

    .plan-form label,
    .form-group-title {
        white-space: normal !important;
    }

    .plan-form .form-group-row {
        flex-direction: column;
        gap: 8px !important;
    }

    .chip-item {
        flex: 1 1 100%;
    }
}