:root {
    --ip-primary: #7c3aed; /* Brand Violet */
    --ip-primary-hover: #6d28d9;
    --ip-primary-light: #f5f3ff;
    --ip-secondary: #ec4899; /* Brand Pink */
    --ip-text-main: #0f172a;
    --ip-text-muted: #64748b;
    --ip-text-light: #94a3b8;
    --ip-bg-body: #ffffff;
    --ip-bg-surface: #f8fafc;
    --ip-border: #e2e8f0;
    --ip-border-focus: #c4b5fd;
    --ip-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --ip-shadow-md: 0 10px 15px -3px rgba(124, 58, 237, 0.08), 0 4px 6px -2px rgba(124, 58, 237, 0.04);
    --ip-shadow-lg: 0 20px 40px -5px rgba(124, 58, 237, 0.15), 0 10px 20px -5px rgba(124, 58, 237, 0.1);
    --ip-radius: 16px;
    --ip-radius-sm: 12px;
    --ip-radius-pill: 9999px;
    --ip-font: 'Poppins', system-ui, -apple-system, sans-serif;
    --ip-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ip-booking-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 48px;
    background: var(--ip-bg-body);
    border-radius: 24px;
    box-shadow: var(--ip-shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-family: var(--ip-font);
    position: relative;
    overflow: hidden;
}

/* Optional Glassmorphism overlay hint */
.ip-booking-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, var(--ip-primary), var(--ip-secondary));
    z-index: 10;
}

/* Step Indicator */
.ip-step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 20px;
    position: relative;
}
.ip-step-indicator::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--ip-border);
    border-radius: var(--ip-radius-pill);
}

.ip-step {
    flex: 1;
    text-align: center;
    color: var(--ip-text-light);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    transition: var(--ip-transition);
    letter-spacing: 0.5px;
    padding-bottom: 15px;
    z-index: 2;
    text-transform: uppercase;
}

.ip-step.active {
    color: var(--ip-primary);
}
.ip-step.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 4px;
    background: var(--ip-primary);
    border-radius: var(--ip-radius-pill);
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.5);
}

.ip-step.completed {
    color: var(--ip-secondary);
}
.ip-step.completed::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 4px;
    background: var(--ip-secondary);
    border-radius: var(--ip-radius-pill);
}

/* Form Groups & Labels */
.ip-booking-form .ip-form-group {
    margin-bottom: 28px;
}

.ip-booking-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--ip-text-main);
    letter-spacing: 0.3px;
}
.ip-hidden-label {
    display: none !important;
}

/* Inputs */
.ip-booking-form input[type="text"],
.ip-booking-form input[type="email"],
.ip-booking-form input[type="tel"] {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid var(--ip-border);
    border-radius: var(--ip-radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--ip-text-main);
    background: var(--ip-bg-surface);
    transition: var(--ip-transition);
}

.ip-booking-form input[type="text"]:focus,
.ip-booking-form input[type="email"]:focus,
.ip-booking-form input[type="tel"]:focus {
    border-color: var(--ip-border-focus);
    background: var(--ip-bg-body);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    outline: none;
}

/* Ticket Info Box */
.ip-ticket-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--ip-primary-light);
    border-radius: var(--ip-radius);
    border: 1px solid rgba(124, 58, 237, 0.1);
}
.ip-ticket-info h4 {
    margin: 0 0 10px 0;
    color: var(--ip-primary);
    font-size: 18px;
    font-weight: 700;
}
.ip-ticket-date {
    font-size: 20px;
    font-weight: 700;
    margin: 10px 0;
    color: var(--ip-text-main);
}
.ip-ticket-price {
    margin: 0;
    color: var(--ip-text-muted);
    font-size: 15px;
    font-weight: 500;
}

/* Tier Cards (Option B Layout) */
.ip-tiers-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}
.ip-tier-card {
    background: #fff;
    border-radius: var(--ip-radius-sm);
    overflow: hidden;
    box-shadow: var(--ip-shadow-sm);
    border: 1px solid var(--ip-border);
    display: flex;
    flex-direction: column;
    transition: var(--ip-transition);
}
.ip-tier-card:hover {
    box-shadow: var(--ip-shadow-md);
    transform: translateY(-2px);
}
.ip-tier-header {
    background: #4a0d2a; /* Deep purple/maroon from the image */
    color: #fff;
    padding: 20px;
    min-height: 80px;
    display: flex;
    align-items: flex-start;
}
.ip-tier-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}
.ip-tier-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.ip-tier-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--ip-text-main);
    margin-bottom: 10px;
}
.ip-tier-availability {
    font-size: 13px;
    margin-bottom: 20px;
    color: var(--ip-text-muted);
}
.ip-tier-card .ip-qty-wrapper {
    margin-top: auto;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    justify-content: center;
    gap: 15px;
}
.ip-tier-card .ip-qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--ip-border);
    background: #fff;
    font-size: 18px;
    box-shadow: none;
    color: var(--ip-text-main);
}
.ip-tier-card .ip-qty-btn:hover:not(:disabled) {
    border-color: var(--ip-text-muted);
    background: #f8fafc;
    color: var(--ip-text-main);
    transform: none;
    box-shadow: none;
}
.ip-tier-card .ip-qty-input {
    width: 30px;
    font-size: 16px !important;
}
.ip-tier-sold-out {
    opacity: 0.6;
    filter: grayscale(1);
}
.ip-tier-sold-out .ip-tier-header {
    background: #64748b;
}

/* Seating Chart Styles */
.ip-seating-cta {
    background: #fdf2f8;
    border: 1px dashed #ec4899;
    text-align: center;
    padding: 15px;
    border-radius: var(--ip-radius-sm);
    margin-bottom: 30px;
}
.ip-seating-cta a {
    color: #db2777;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    transition: var(--ip-transition);
}
.ip-seating-cta a:hover {
    color: #be185d;
    text-decoration: underline;
}

.ip-seating-chart {
    background: #fff;
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius);
    padding: 30px 20px;
    margin-top: 15px;
    overflow-x: auto; /* for mobile scrolling */
}

.ip-seating-section {
    margin-bottom: 35px;
}
.ip-seating-section:last-child {
    margin-bottom: 0;
}

.ip-seating-section-title {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--ip-text-muted);
    margin-bottom: 20px;
    position: relative;
}
.ip-seating-section-title::before,
.ip-seating-section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--ip-border);
}
.ip-seating-section-title::before { left: 0; }
.ip-seating-section-title::after { right: 0; }

.ip-seating-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ip-seating-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.ip-row-label {
    width: 20px;
    font-weight: 600;
    color: var(--ip-text-muted);
    text-align: right;
    font-size: 13px;
}

.ip-seats-list {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.ip-seat {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

/* Available */
.ip-seat.available {
    border: 2px solid #22c55e;
    color: #22c55e;
    background: #fff;
}
.ip-seat.available:hover {
    background: #dcfce7;
}

/* Selected */
.ip-seat.selected {
    background: #22c55e;
    color: #fff;
    border: 2px solid #22c55e;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

/* Sold */
.ip-seat.sold {
    background: #e2e8f0;
    color: #94a3b8;
    border: 2px solid #e2e8f0;
    cursor: not-allowed;
}

/* Legend */
.ip-seating-legend {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dashed var(--ip-border);
}
.ip-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ip-text-muted);
    font-weight: 500;
}
.ip-legend-item .ip-seat {
    width: 20px;
    height: 20px;
    cursor: default;
    transform: none;
    box-shadow: none;
}
.ip-legend-item .ip-seat:hover {
    background: inherit; /* no hover effect on legend */
}
.ip-legend-item .ip-seat.available { background: #fff; }
.ip-legend-item .ip-seat.selected { background: #22c55e; }
.ip-legend-item .ip-seat.sold { background: #e2e8f0; }

/* Quantity Input (Single Ticket) */
.ip-qty-group {
    max-width: 320px;
    margin: 0 auto 30px;
    text-align: center;
}
.ip-qty-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    background: var(--ip-bg-surface);
    padding: 10px;
    border-radius: var(--ip-radius-pill);
    border: 1px solid var(--ip-border);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.ip-qty-btn {
    background: var(--ip-bg-body);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 24px;
    font-weight: 500;
    cursor: pointer;
    color: var(--ip-text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ip-transition);
    box-shadow: var(--ip-shadow-sm);
}

.ip-qty-btn:hover {
    color: var(--ip-bg-body);
    background: var(--ip-primary);
    transform: scale(1.05);
    box-shadow: var(--ip-shadow-md);
}

.ip-qty-input {
    width: 60px;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-size: 24px !important;
    font-weight: 700;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--ip-text-main);
    -moz-appearance: textfield;
}

.ip-qty-input::-webkit-outer-spin-button,
.ip-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ip-qty-input:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Slots */
.ip-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.ip-slot-btn {
    flex: 1 1 calc(33.33% - 15px);
    padding: 16px 12px;
    border: 2px solid transparent;
    background: var(--ip-bg-surface);
    color: var(--ip-text-main);
    border-radius: var(--ip-radius-sm);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--ip-transition);
    text-align: center;
    box-shadow: var(--ip-shadow-sm);
}

.ip-slot-btn:hover {
    border-color: var(--ip-primary);
    color: var(--ip-primary);
    background: var(--ip-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--ip-shadow-md);
}

.ip-slot-btn.selected {
    background: var(--ip-primary);
    color: #fff;
    border-color: var(--ip-primary);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.25);
    transform: translateY(-2px);
}

/* Calendar Overrides */
.flatpickr-calendar.inline {
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: var(--ip-shadow-md) !important;
    border: none !important;
    border-radius: var(--ip-radius);
    padding: 20px;
    background: var(--ip-bg-body);
}

.flatpickr-innerContainer, .flatpickr-rContainer, .dayContainer, .flatpickr-days {
    width: 100% !important;
    max-width: 100% !important;
}

.flatpickr-day {
    border-radius: 50% !important;
    transition: var(--ip-transition) !important;
}

.flatpickr-day.selected {
    background: var(--ip-primary) !important;
    border-color: var(--ip-primary) !important;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.4) !important;
}

/* Actions & Buttons */
.ip-step-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed var(--ip-border);
}

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

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ip-btn, .ip-submit-btn {
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--ip-primary), var(--ip-secondary));
    color: #fff;
    border: none;
    border-radius: var(--ip-radius-pill);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ip-transition);
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
    font-family: inherit;
}

.ip-btn:hover, .ip-submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px rgba(124, 58, 237, 0.3);
}

.ip-btn:disabled {
    background: var(--ip-border);
    color: var(--ip-text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ip-btn-secondary {
    background: var(--ip-bg-surface);
    color: var(--ip-text-main);
    border: 1px solid var(--ip-border);
    box-shadow: none;
}

.ip-btn-secondary:hover {
    background: var(--ip-border);
    color: var(--ip-text-main);
    box-shadow: var(--ip-shadow-sm);
    transform: translateY(-2px);
}

/* Review Box */
.ip-review-box {
    background: var(--ip-bg-body);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--ip-shadow-sm);
    position: relative;
}

.ip-review-box h4 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--ip-primary);
    font-size: 20px;
    font-weight: 700;
}

.ip-review-box p {
    margin: 15px 0;
    font-size: 15px;
    color: var(--ip-text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ip-review-box p strong {
    color: var(--ip-text-main);
    font-weight: 600;
}

.ip-review-total-wrap {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--ip-primary) !important;
    margin-top: 25px !important;
    padding-top: 20px;
    border-top: 1px dashed var(--ip-border);
}

.ip-review-box hr {
    border: 0;
    border-top: 1px solid var(--ip-border);
    margin: 25px 0;
}

/* Payment Box */
.ip-payment-box {
    margin-bottom: 30px;
    background: var(--ip-primary-light);
    padding: 25px;
    border-radius: var(--ip-radius);
    border: 1px solid rgba(124, 58, 237, 0.1);
}
.ip-payment-box h4 {
    margin: 0 0 20px 0;
    color: var(--ip-primary);
    font-size: 18px;
}
.ip-card-input {
    padding: 18px 20px;
    border: 2px solid #fff;
    border-radius: var(--ip-radius-sm);
    background: #fff;
    box-shadow: var(--ip-shadow-sm);
    transition: var(--ip-transition);
}
.ip-card-error-msg {
    color: #dc2626;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

/* Stripe focus */
.ip-card-input.StripeElement--focus {
    border-color: var(--ip-border-focus);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

/* Powered By */
.ip-powered-by {
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
    color: var(--ip-text-light);
    font-weight: 500;
}
.ip-powered-by a {
    color: var(--ip-primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--ip-transition);
}
.ip-powered-by a:hover {
    color: var(--ip-secondary);
}

/* Animations */
.ip-form-step {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .ip-booking-container {
        padding: 30px 20px;
        margin: 20px;
        border-radius: 20px;
    }
    
    .ip-step-actions {
        flex-direction: column;
        gap: 15px;
    }
    .ip-step-actions .ip-btn {
        width: 100%;
    }
    
    .ip-qty-group {
        max-width: 100%;
    }
    
    .ip-step {
        font-size: 12px;
    }
}
