/* Airport Parking Booking System Styles */

/* Reset and Base Styles */
.apb-booking-container * {
    box-sizing: border-box;
}

.apb-booking-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.apb-progress-bar {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.apb-step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: #f8f9fa;
    color: #007bff;
    position: relative;
    transition: all 0.3s ease;
    border-right: 1px solid #e9ecef;
}

.apb-step:last-child {
    border-right: none;
}

.apb-step.active {
    background: #007bff;
    color: white;
}

.apb-step.completed {
    background: #28a745;
    color: white;
}

.apb-step-number {
    border-radius: 3px;
    padding: 2px 8px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    opacity: 0.7;
}

.apb-step.active .apb-step-number,
.apb-step.completed .apb-step-number {
    opacity: 1;
}

.apb-step-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.apb-step-icon {
    font-size: 18px;
    margin-bottom: 4px;
}

.apb-step-text {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* Form Container */
.apb-form-container {
    background: white;
    padding: 40px;
}

.apb-main-title {
    margin: 0 0 30px 0;
    color: #343a40;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
}

/* Step Content */
.apb-step-content {
    display: none;
}

.apb-step-content.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.apb-step-header {
    text-align: center;
    margin-bottom: 40px;
}

.apb-step-header h3 {
    margin: 0 0 10px 0;
    color: #343a40;
    font-size: 24px;
    font-weight: 600;
}

.apb-step-header p {
    margin: 0;
    color: #007bff;
    font-size: 16px;
}

/* Form Styles */
.apb-form {
    max-width: 800px;
    margin: 0 auto;
}

.apb-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.apb-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.apb-form-group-half {
    flex: 0 0 calc(50% - 10px);
}

.apb-form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #343a40;
    font-size: 14px;
}

.required {
    color: #dc3545;
}

.apb-optional {
    font-weight: 400;
    color: #007bff;
    font-size: 12px;
}

/* Input Styles */
.apb-input-group {
    position: relative;
}

.apb-form-group input,
.apb-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.apb-form-group input:focus,
.apb-form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
}

.apb-input-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #007bff;
    pointer-events: none;
}

/* Promo Code Styles */
.apb-promo-group {
    display: flex;
    gap: 10px;
}

.apb-promo-group input {
    flex: 1;
}

.apb-promo-group button {
    flex: 0 0 auto;
    padding: 14px 60px;
    white-space: nowrap;
}

.apb-promo-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.apb-promo-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.apb-promo-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Duration Display */
.apb-duration-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.apb-duration-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.apb-duration-label {
    font-weight: 600;
    color: #343a40;
}

.apb-duration-value {
    font-size: 18px;
    font-weight: 700;
    color: #007bff;
}

/* Buttons */
.apb-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.apb-btn-primary {
    background: #007bff;
    color: white;
}

.apb-btn-primary:hover {
    background: #007bf1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.3);
}

.apb-btn-secondary {
    background: #f8f9fa;
    color: #007bff;
    border: 2px solid #e9ecef;
}

.apb-btn-secondary:hover {
    background-color: #007bff;
    color: white;
}

.apb-btn-large {
    padding: 18px 36px;
    font-size: 18px;
}

.apb-btn-payment {
    width: 100%;
    background: #28a745;
    color: white;
    font-size: 18px;
    padding: 18px;
    margin-top: 20px;
}

.apb-btn-payment:hover:not(:disabled) {
    background: #218838;
}

.apb-btn-payment:disabled {
    background: #007bff;
    cursor: not-allowed;
}

.apb-btn-icon {
    font-size: 14px;
}

/* Booking Summary */
.apb-booking-summary {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    color: #856404;
}

/* Loading States */
.apb-loading {
    text-align: center;
    padding: 60px 20px;
    color: #007bff;
}

.apb-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.apb-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Parking Slots */
.apb-parking-slot {
    display: flex;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.apb-parking-slot:hover {
    border-color: #007bff;
    box-shadow: 0 4px 20px rgba(255, 149, 0, 0.1);
    transform: translateY(-2px);
}

.apb-parking-slot.not-available {
    opacity: 0.6;
    border-color: #dee2e6;
}

.apb-parking-slot.not-available:hover {
    transform: none;
    box-shadow: none;
}

.apb-slot-image {
    width: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    padding: 20px;
    display: flex;
    align-items: center;
}

.apb-ratings {
    width: 100%;
}

.apb-rating-bar {
    margin-bottom: 12px;
}

.apb-rating-bar:last-child {
    margin-bottom: 0;
}

.apb-rating-bar label {
    color: white;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    display: block;
}

.apb-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.apb-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.apb-slot-details {
    flex: 1;
    padding: 24px;
}

.apb-slot-details h3 {
    margin: 0 0 8px 0;
    color: #343a40;
    font-size: 20px;
    font-weight: 700;
}

.apb-slot-type {
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apb-slot-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apb-feature {
    font-size: 14px;
    color: #007bff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.apb-feature-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.apb-slot-price {
    width: 220px;
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 1px solid #e9ecef;
    background: #f8f9fa;
}

.apb-price-display {
    margin-bottom: 20px;
}

.apb-price {
    font-size: 36px;
    font-weight: 800;
    color: #343a40;
    line-height: 1;
    margin-bottom: 4px;
}

.apb-price-per-day {
    font-size: 12px;
    color: #007bff;
    font-weight: 500;
}

.apb-slot-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.apb-book-btn,
.apb-info-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
}

.apb-not-available {
    background: #dc3545;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.apb-not-available-text {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.apb-not-available small {
    font-size: 11px;
    opacity: 0.8;
}

/* Sections */
.apb-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f8f9fa;
}

.apb-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.apb-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px 0;
    color: #343a40;
    font-size: 20px;
    font-weight: 700;
}

.apb-section-icon {
    font-size: 24px;
}

/* Form Actions */
.apb-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 20px;
}

.apb-form-actions .apb-btn {
    flex: 0 0 auto;
}

/* Payment Container */
.apb-payment-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.apb-payment-left {
    flex: 2;
}

.apb-payment-right {
    flex: 1;
}

.apb-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.apb-warning-icon {
    font-size: 20px;
    flex: 0 0 auto;
}

.apb-warning-text {
    font-size: 14px;
    line-height: 1.4;
}

/* Card Element */
.apb-card-element-container {
    margin-bottom: 20px;
}

#card-element {
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s ease;
}

#card-element.StripeElement--focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
}

#card-errors {
    color: #dc3545;
    font-size: 14px;
    margin-top: 8px;
}

/* Payment Processing States */
.apb-payment-processing {
    display: flex;
    align-items: center;
    justify-content: center;
}

.apb-payment-text {
    display: block;
}

.apb-btn-payment[disabled] .apb-payment-text {
    display: none;
}

.apb-btn-payment[disabled] .apb-payment-processing {
    display: flex;
}

/* Marketing Consent */
.apb-marketing-consent {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.apb-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.apb-checkbox-label input[type="checkbox"] {
    display: none;
}

.apb-checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 3px;
    position: relative;
    flex: 0 0 auto;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.apb-checkbox-label input[type="checkbox"]:checked + .apb-checkbox-custom {
    background: #007bff;
    border-color: #007bff;
}

.apb-checkbox-label input[type="checkbox"]:checked + .apb-checkbox-custom::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.apb-checkbox-text {
    color: #007bff;
}

/* Booking Summary Final */
.apb-booking-summary-final {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    position: sticky;
    top: 20px;
}

.apb-booking-summary-final h4 {
    margin: 0 0 20px 0;
    color: #343a40;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.apb-summary-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dee2e6;
}

.apb-summary-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.apb-summary-dates {
    margin-bottom: 16px;
}

.apb-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.apb-summary-row:last-child {
    margin-bottom: 0;
}

.apb-summary-label {
    color: #007bff;
    font-weight: 500;
}

.apb-summary-value {
    color: #343a40;
    font-weight: 600;
    text-align: right;
}

.apb-price-breakdown {
    border-top: 2px solid #dee2e6;
    padding-top: 16px;
}

.apb-price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.apb-price-line:last-child {
    margin-bottom: 0;
}

.apb-price-line.apb-total {
    border-top: 1px solid #dee2e6;
    padding-top: 12px;
    margin-top: 12px;
    font-size: 16px;
}

.apb-discount {
    color: #28a745;
    font-weight: 600;
}

.apb-terms-final {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #dee2e6;
    font-size: 12px;
    color: #007bff;
    text-align: center;
    line-height: 1.4;
}

.apb-terms-final a {
    color: #007cba;
    text-decoration: none;
}

.apb-terms-final a:hover {
    text-decoration: underline;
}

.apb-terms {
    margin-top: 20px;
    font-size: 12px;
    color: #007bff;
    text-align: center;
    line-height: 1.4;
}

.apb-terms a {
    color: #007cba;
    text-decoration: none;
}

.apb-terms a:hover {
    text-decoration: underline;
}

/* Messages */
.apb-messages-container {
    margin-top: 30px;
}

.apb-success {
    background: #d4edda;
    color: #155724;
    padding: 16px 20px;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.apb-success::before {
    content: '✅';
    font-size: 18px;
    flex: 0 0 auto;
}

.apb-error {
    background: #f8d7da;
    color: #721c24;
    padding: 16px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.apb-error::before {
    content: '❌';
    font-size: 18px;
    flex: 0 0 auto;
}

.apb-info {
    background: #d1ecf1;
    color: #0c5460;
    padding: 16px 20px;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.apb-info::before {
    content: 'ℹ️';
    font-size: 18px;
    flex: 0 0 auto;
}

/* No Slots Message */
.apb-no-slots {
    text-align: center;
    padding: 60px 20px;
    color: #007bff;
}

.apb-no-slots h3 {
    margin: 0 0 16px 0;
    color: #343a40;
    font-size: 24px;
}

.apb-no-slots p {
    margin: 0;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .apb-booking-container {
        margin: 10px;
    }
    
    .apb-form-container {
        padding: 20px;
    }
    
    .apb-main-title {
        font-size: 24px;
    }
    
    .apb-progress-bar {
        flex-wrap: wrap;
    }
    
    .apb-step {
        min-width: 25%;
        padding: 15px 8px;
    }
    
    .apb-step-number {
        font-size: 12px;
        margin-right: 8px;
    }
    
    .apb-step-text {
        font-size: 12px;
    }
    
    .apb-step-icon {
        font-size: 14px;
    }
    
    .apb-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .apb-form-group-half {
        flex: 1;
    }
    
    .apb-parking-slot {
        flex-direction: column;
    }
    
    .apb-slot-image,
    .apb-slot-price {
        width: 100%;
    }
    
    .apb-slot-image {
        padding: 16px;
    }
    
    .apb-slot-price {
        border-left: none;
        border-top: 1px solid #e9ecef;
        padding: 20px;
    }
    
    .apb-payment-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .apb-form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .apb-form-actions .apb-btn {
        width: 100%;
    }
    
    .apb-promo-group {
        flex-direction: column;
    }
    
    .apb-promo-group button {
        flex: 1;
    }
    
    .apb-slot-actions {
        flex-direction: row;
        gap: 12px;
    }
    
    .apb-step-header h3 {
        font-size: 20px;
    }
    
    .apb-section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .apb-form-container {
        padding: 16px;
    }
    
    .apb-main-title {
        font-size: 20px;
    }
    
    .apb-step {
        padding: 12px 4px;
        flex-direction: column;
    }
    
    .apb-step-number {
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .apb-step-content {
        text-align: center;
    }
    
    .apb-step-icon {
        display: none;
    }
    
    .apb-step-text {
        font-size: 10px;
    }
    
    .apb-price {
        font-size: 28px;
    }
    
    .apb-booking-summary-final {
        position: static;
    }
    
    .apb-slot-actions {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .apb-booking-container {
        box-shadow: none;
        background: white;
    }
    
    .apb-progress-bar,
    .apb-form-actions,
    .apb-btn {
        display: none !important;
    }
    
    .apb-step-content {
        display: block !important;
    }
    
    .apb-payment-container {
        flex-direction: column;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .apb-booking-container {
        background: #1a1a1a;
        color: #e9ecef;
    }
    
    .apb-form-container {
        background: #2d3748;
    }
    
    .apb-main-title,
    .apb-step-header h3,
    .apb-section-title {
        color: #f7fafc;
    }
    
    .apb-form-group input,
    .apb-form-group select {
        background: #4a5568;
        border-color: #718096;
        color: #f7fafc;
    }
    
    .apb-parking-slot {
        background: #4a5568;
        border-color: #718096;
    }
    
    .apb-booking-summary-final {
        background: #4a5568;
        border-color: #718096;
    }
}

/* Accessibility Improvements */
.apb-booking-container *:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.apb-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .apb-booking-container {
        border: 2px solid #000;
    }
    
    .apb-btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .apb-btn-primary:hover {
        background: #fff;
        color: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .apb-step-content {
        animation: none;
    }
    
    .apb-parking-slot:hover {
        transform: none;
    }
    
    .apb-btn-primary:hover {
        transform: none;
    }
    
    * {
        transition: none !important;
    }
}