/* ==========================================================================
   Flight Details & Booking Page Styles
   ========================================================================== */

/* Page Layout - Force 2-column grid on desktop */
.st-booking-layout {
    display: grid !important;
    grid-template-columns: 1fr 380px !important;
    gap: 30px !important;
    padding: 0;
    /* Remove extra padding - handled by section */
    align-items: start;
}

/* Sidebar wrapper - just holds the sticky element */
.st-sidebar-summary {
    display: block !important;
}

/* Sticky styling is on .st-sticky-sidebar inside */
.st-sidebar-summary .st-sticky-sidebar {
    position: sticky;
    top: 100px;
    z-index: 100;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Both columns start at same level */
.st-main-content,
.st-sidebar-summary {
    padding-top: 0;
    margin-top: 0;
}

/* Mobile: Single column layout */
@media (max-width: 991px) {
    .st-booking-layout {
        grid-template-columns: 1fr !important;
    }

    .st-sidebar-summary .st-sticky-sidebar {
        position: relative;
        top: 0;
        max-height: none;
    }
}

/* Section Header */
.st-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--st-space-4);
}

.st-section-title {
    font-size: var(--st-text-xl);
    font-weight: var(--st-font-bold);
    color: var(--st-text-primary);
}

/* Passenger Form */
.st-passenger-card {
    background: var(--st-bg-card);
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow-card);
    padding: var(--st-space-6);
    margin-bottom: var(--st-space-6);
}

.st-passenger-header {
    display: flex;
    align-items: center;
    gap: var(--st-space-3);
    margin-bottom: var(--st-space-5);
    padding-bottom: var(--st-space-4);
    border-bottom: 1px solid var(--st-border-light);
}

.st-passenger-icon {
    width: 32px;
    height: 32px;
    background: var(--st-accent-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--st-font-bold);
}

.st-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--st-space-4);
}

@media (max-width: 768px) {
    .st-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Insurance / Add-ons Card */
.st-addon-card {
    background: #F8FAFC;
    border: 1px solid var(--st-border-medium);
    border-radius: var(--st-radius-lg);
    overflow: hidden;
    transition: all var(--st-transition-base);
    margin-bottom: var(--st-space-6);
}

.st-addon-card.selected {
    border-color: var(--st-accent);
    background: #F0F5FF;
    box-shadow: 0 0 0 2px var(--st-accent-light);
}

.st-addon-header {
    padding: var(--st-space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid var(--st-border-light);
}

.st-addon-title {
    font-weight: var(--st-font-bold);
    color: var(--st-text-primary);
    display: flex;
    align-items: center;
    gap: var(--st-space-2);
}

.st-addon-price {
    font-weight: var(--st-font-bold);
    color: var(--st-text-primary);
}

.st-addon-content {
    padding: var(--st-space-5);
}

.st-benefit-list {
    display: flex;
    flex-direction: column;
    gap: var(--st-space-3);
    margin-bottom: var(--st-space-4);
}

.st-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: var(--st-space-3);
    font-size: var(--st-text-sm);
    color: var(--st-text-secondary);
}

.st-benefit-icon {
    color: var(--st-success);
    margin-top: 2px;
}

/* Sticky Sidebar (Price Summary) */
.st-price-summary {
    position: sticky;
    top: var(--st-space-6);
    background: var(--st-bg-card);
    border-radius: var(--st-radius-lg);
    box-shadow: var(--st-shadow-lg);
    overflow: hidden;
}

.st-summary-header {
    background: var(--st-primary);
    color: white;
    padding: var(--st-space-4) var(--st-space-5);
    font-weight: var(--st-font-bold);
}

.st-summary-content {
    padding: var(--st-space-5);
}

.st-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--st-space-3);
    font-size: var(--st-text-sm);
    color: var(--st-text-secondary);
}

.st-summary-row.total {
    margin-top: var(--st-space-4);
    padding-top: var(--st-space-4);
    border-top: 1px dashed var(--st-border-light);
    font-size: var(--st-text-xl);
    font-weight: var(--st-font-bold);
    color: var(--st-text-primary);
}

.st-summary-total-label {
    color: var(--st-text-primary);
}

.st-summary-total-amount {
    color: var(--st-accent);
}

/* Itinerary Preview in Sidebar */
.st-mini-itinerary {
    margin-bottom: var(--st-space-5);
    padding-bottom: var(--st-space-5);
    border-bottom: 1px solid var(--st-border-light);
}

.st-mini-leg {
    display: flex;
    align-items: flex-start;
    gap: var(--st-space-3);
    margin-bottom: var(--st-space-3);
}

.st-mini-leg:last-child {
    margin-bottom: 0;
}

.st-mini-time {
    font-weight: var(--st-font-bold);
    color: var(--st-text-primary);
    width: 40px;
}

.st-mini-route {
    flex: 1;
    font-size: var(--st-text-sm);
    color: var(--st-text-secondary);
}

/* Custom Radio Button for Insurance */
.st-radio-card {
    display: flex;
    align-items: center;
    padding: var(--st-space-3);
    border: 1px solid var(--st-border-light);
    border-radius: var(--st-radius-md);
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.st-radio-card:hover {
    border-color: var(--st-accent);
    background: #F9FAFB;
}

/* Form Field Alignment */
.st-form-group {
    margin-bottom: 20px;
}

.st-passenger-card .row.y-gap-20>[class*='col-'] {
    display: flex;
    flex-direction: column;
}

.st-passenger-card .st-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.st-passenger-card .st-input,
.st-passenger-card .st-select {
    flex: 1;
    min-height: 48px;
}

/* Ensure consistent input heights */
.st-input,
.st-select {
    height: 48px;
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #FAFAFA;
    transition: all 0.2s ease;
    text-align: left;
}

.st-input:focus,
.st-select:focus {
    border-color: #3554D1;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(53, 84, 209, 0.1);
    outline: none;
}

/* ==========================================================================
   Card Borders - Make borders more visible
   ========================================================================== */

/* All cards should have visible borders */
.st-card {
    border: 1px solid #E5E7EB !important;
    border-radius: 12px;
    overflow: hidden;
}

/* Price summary card in sidebar */
.st-price-summary {
    border: 1px solid #E5E7EB !important;
    border-radius: 12px;
    overflow: hidden;
}

/* Addon cards */
.st-addon-header {
    border-bottom: 1px solid #E5E7EB;
}

/* Flight cards */
.st-card-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.st-card-body {
    border-top: none;
}