/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #f8f9fa;
}

/* Remove number input spinners (Chrome, Safari, Edge, Opera) */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Remove number input spinners (Firefox) */
input[type=number] {
  -moz-appearance: textfield;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: #7D00FF;
    border-bottom: 1px solid #6A00DB;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    display: block;
    text-decoration: none;
}

.logo img {
    height: 24px;
    width: auto;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 133px);
}

/* Checkout Container */
.checkout-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.checkout-header {
    background-color: #ffffff;
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.location-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0rem;
    text-align: center;
}

.location-address {
    text-align: center;
    margin-top: 0rem;
    margin-bottom: 1.5rem;
}

.location-address a {
    color: #0066cc;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.location-address a:hover {
    color: #0052a3;
    text-decoration: underline;
}



/* Checkout Content */
.checkout-content {
    padding: 2rem;
}

/* Error Message */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.step-title {
    margin-bottom: 2rem;
    text-align: center;
}

.step-title h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.step-title p {
    color: #6b7280;
    font-size: 1rem;
}

/* Booking Summary */
.booking-summary {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.booking-summary-final {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.booking-summary-final h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-weight: 700;
    font-size: 1.125rem;
    color: #1a1a1a;
    border-top: 2px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

.summary-item.discount-item {
    color: #10b981;
    font-weight: 600;
}

.summary-item.discount-item #discount-amount {
    color: #10b981;
    font-weight: 600;
}

.discount-value {
    color: #10b981;
    font-weight: 600;
}

/* Ticket Selector */
.ticket-selector {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.ticket-price {
    color: #6b7280;
    font-size: 0.875rem;
}

.ticket-description {
    font-size: 0.875rem;
    color: #4b5563;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.ticket-description p {
    margin: 0.25rem 0;
}


.order-summary {
    background-color: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.order-summary h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.summary-total {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.125rem;
    text-align: right;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.quantity-btn:active {
    transform: scale(0.95);
}

#quantity,
#general-quantity,
#raceway-quantity {
    width: 80px;
    height: 48px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    background-color: #ffffff;
    transition: border-color 0.2s ease;
}

#quantity:focus,
#general-quantity:focus,
#raceway-quantity:focus {
    outline: none;
    border-color: #7D00FF;
    box-shadow: 0 0 0 3px rgba(125, 0, 255, 0.1);
}

/* Price Summary */
.price-summary {
    text-align: center;
    margin-bottom: 2rem;
}

.price-calculation {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.total-price {
    color: #0066cc;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Calendar Styles */
.calendar-container {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

#calendar-month-year {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.calendar-day-header {
    background-color: #f8fafc;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
}

.calendar-day {
    background-color: #ffffff;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
}

.calendar-day:hover:not(.disabled) {
    background-color: #f3f4f6;
    border: 2px solid #7D00FF;
}

.calendar-day.selected {
    background-color: #7D00FF;
    color: #ffffff;
    border: 2px solid #7D00FF;
}
.calendar-day.selected:hover {
    background-color: #7D00FF;
    color: #ffffff;
    border: 2px solid #7D00FF;
}

.calendar-day.disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

.calendar-day.sold-out {
    background-color: #fee2e2;
    color: #dc2626;
    cursor: not-allowed;
    position: relative;
    font-weight: 700;
    font-size: 0.6rem;
    text-align: center;
    line-height: 1.2;
}

.calendar-day.sold-out:hover {
    background-color: #fecaca;
    border: 2px solid #dc2626;
}

.calendar-day.empty {
    background-color: transparent;
    cursor: default;
}

.calendar-day.empty:hover {
    background-color: transparent;
}

/* Time Slots */
.timeslot-container {
  margin-bottom: 2em; /* matches calendar spacing */
}

.timeslot-grid { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.5em; 
    margin-top: 1em; 
}

.time-slot-group {
    margin-bottom: 1.5rem;
}

.time-slot-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.time-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
}

.time-option {
    display: block;
    cursor: pointer;
}

.time-option input[type="radio"] {
    display: none;
}

.time-button {
    display: block;
    padding: 0.75rem 1rem;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    color: #4b5563;
    transition: all 0.2s;
}

.time-option input[type="radio"]:checked + .time-button {
    background-color: #0066cc;
    color: #ffffff;
    border-color: #0066cc;
}

.time-button:hover {
    border-color: #0066cc;
    background-color: #f0f8ff;
}

/* Form Styles */
.checkout-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Payment Section */
.payment-section {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.payment-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

/* Buttons */
.continue-btn {
    width: 100%;
    padding: 16px;
    background: #7d00ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    position: relative;
    z-index: 1002;
    text-align: center;
    text-decoration: none;
    display: block;
    box-shadow: 0 2px 6px #0003;
}

.continue-btn:hover:not(:disabled) {
    background-color: #6A00E6;
}

.continue-btn:disabled {
    background-color: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.primary-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #7D00FF;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.primary-btn:hover {
    background-color: #6A00E6;
}

.secondary-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #ffffff;
    color: #4b5563;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.secondary-btn:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

/* Success Page */
.success-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 3rem;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.success-title {
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.booking-details {
    background-color: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: left;
}

.booking-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item.total {
    font-weight: 700;
    font-size: 1.125rem;
    color: #1a1a1a;
    border-top: 2px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

.detail-label {
    color: #6b7280;
    font-weight: 500;
}

.detail-value {
    color: #1a1a1a;
    font-weight: 500;
}

.detail-value a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.detail-value a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.success-actions .primary-btn {
    width:70%;
}
.success-actions .secondary-btn {
    width:70%;
}

.next-steps {
    background-color: #f0f8ff;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
}

.next-steps h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps li {
    padding: 0.5rem 0;
    color: #4b5563;
}

/* Error Page */
.error-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 3rem;
    text-align: center;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Error Messages */
.error-message {
    background-color: #fbfbfb;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background-color: #eeeeee;
    color: #ffffff;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: auto;
}

.footer p {
    color: #92969c;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .checkout-container {
        margin: 0 15px;
    }
    
    .checkout-header,
    .checkout-content {
        padding: 1.5rem;
    }
    
    .location-name {
        font-size: 1.5rem;
    }
    
    .location-address {
        margin-bottom: 1rem;
    }
    
    .location-address a {
        font-size: 0.875rem;
    }
    
    .progress-bar {
        transform: scale(0.8);
    }
    
    .ticket-selector {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .time-options {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .success-actions,
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .success-container,
    .error-container {
        margin: 0 15px;
        padding: 2rem;
    }
    
    .calendar-container {
        padding: 1.25rem;
    }
    
    .calendar-day-header {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
    
    .calendar-day {
        padding: 0.6rem;
        min-height: 40px;
    }
    
    .calendar-day.sold-out {
        font-size: 0.5rem;
    }
    
    .step-title {
        display: none;
    }
}

@media (max-width: 480px) {
    .price-calculation {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .calendar-container {
        padding: 1rem;
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .calendar-header {
        margin-bottom: 0.75rem;
    }
    
    .calendar-nav {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    #calendar-month-year {
        font-size: 1.1rem;
    }
    
    .calendar-grid {
        gap: 0;
        font-size: 0.875rem;
    }
    
    .calendar-day-header {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    .calendar-day {
        padding: 0.5rem 0.25rem;
        min-height: 36px;
        font-size: 0.875rem;
    }
    
    .calendar-day.sold-out {
        font-size: 0.45rem;
    }
    
    .time-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .calendar-container {
        padding: 0.75rem;
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }
    
    .calendar-nav {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    #calendar-month-year {
        font-size: 1rem;
    }
    
    .calendar-day-header {
        padding: 0.4rem 0.1rem;
        font-size: 0.7rem;
    }
    
    .calendar-day {
        padding: 0.4rem 0.1rem;
        min-height: 32px;
        font-size: 0.8rem;
    }
    
    .calendar-day.sold-out {
        font-size: 0.4rem;
    }
} 