/**
 * Car Transfer Booking - Public Styles
 * Complete booking form styling with customizable colors
 */

/* ==========================================================================
   Global Styles
   ========================================================================== */

.ctb-booking-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--ctb-text);
    background: #f5f7fa;
    padding: 40px 20px;
    min-height: 100vh;
}

.ctb-booking-container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--ctb-background);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.ctb-hidden {
    display: none !important;
}

/* ==========================================================================
   Header
   ========================================================================== */

.ctb-header {
    text-align: center;
    margin-bottom: 40px;
}

.ctb-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--ctb-primary);
    margin: 0 0 10px 0;
}

.ctb-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.ctb-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.ctb-progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--ctb-border);
    z-index: 0;
}

.ctb-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.ctb-step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--ctb-border);
    color: #999;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.ctb-step-label {
    display: block;
    font-size: 14px;
    color: #999;
    transition: all 0.3s ease;
}

.ctb-progress-step.ctb-active .ctb-step-number {
    background: var(--ctb-primary);
    border-color: var(--ctb-primary);
    color: #fff;
}

.ctb-progress-step.ctb-active .ctb-step-label {
    color: var(--ctb-primary);
    font-weight: 600;
}

.ctb-progress-step.ctb-completed .ctb-step-number {
    background: var(--ctb-success);
    border-color: var(--ctb-success);
    color: #fff;
}

.ctb-progress-step.ctb-completed .ctb-step-label {
    color: var(--ctb-success);
}

/* ==========================================================================
   Booking Types Grid
   ========================================================================== */

.ctb-booking-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.ctb-booking-type {
    background: #fff;
    border: 2px solid var(--ctb-border);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ctb-booking-type:hover {
    border-color: var(--ctb-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.ctb-booking-type.ctb-selected {
    border-color: var(--ctb-primary);
    background: rgba(75, 61, 42, 0.05);
}

.ctb-type-icon {
    margin-bottom: 20px;
}

.ctb-type-icon svg {
    stroke: var(--ctb-primary);
    stroke-width: 2;
}

.ctb-booking-type h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--ctb-text);
    margin: 0 0 8px 0;
}

.ctb-booking-type p {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 20px 0;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.ctb-form {
    width: 100%;
}

.ctb-form-section {
    margin-bottom: 30px;
}

.ctb-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ctb-form-group {
    flex: 1;
    margin-bottom: 20px;
}

.ctb-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ctb-text);
    margin-bottom: 8px;
}

.ctb-input,
.ctb-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--ctb-border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--ctb-text);
    transition: all 0.3s ease;
    background: #fff;
}

.ctb-input:focus,
.ctb-select:focus {
    outline: none;
    border-color: var(--ctb-primary);
    box-shadow: 0 0 0 3px rgba(75, 61, 42, 0.1);
}

.ctb-input::placeholder {
    color: #adb5bd;
}

textarea.ctb-input {
    resize: vertical;
    min-height: 100px;
}

.ctb-col-6 {
    flex: 1;
}

.ctb-col-12 {
    flex: 0 0 100%;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.ctb-btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.ctb-btn-primary {
    background: var(--ctb-primary);
    color: #fff;
}

.ctb-btn-primary:hover {
    background: #3a2f1e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.ctb-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.ctb-btn-secondary:hover {
    background: #545b62;
}

.ctb-btn-select {
    background: var(--ctb-secondary);
    color: var(--ctb-text);
    width: 100%;
}

.ctb-btn-select:hover {
    background: #d9a003;
    transform: translateY(-2px);
}

.ctb-btn-outline {
    background: transparent;
    color: var(--ctb-primary);
    border: 2px solid var(--ctb-primary);
}

.ctb-btn-outline:hover {
    background: var(--ctb-primary);
    color: #fff;
}

.ctb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Distance Info Box
   ========================================================================== */

.ctb-distance-info {
    margin: 20px 0;
}

.ctb-info-box {
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
}

/* ==========================================================================
   Packages Grid
   ========================================================================== */

.ctb-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.ctb-package-card {
    border: 2px solid var(--ctb-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.ctb-package-card:hover {
    border-color: var(--ctb-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.ctb-package-card.ctb-selected {
    border-color: var(--ctb-primary);
    box-shadow: 0 0 0 3px rgba(75, 61, 42, 0.1);
}

.ctb-package-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.ctb-package-content {
    padding: 20px;
}

.ctb-package-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--ctb-text);
    margin: 0 0 8px 0;
}

.ctb-package-description {
    font-size: 14px;
    color: #6c757d;
    margin: 0 0 12px 0;
}

.ctb-package-locations {
    font-size: 13px;
    color: #495057;
    margin: 0 0 12px 0;
}

.ctb-package-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--ctb-primary);
    margin: 12px 0 0 0;
}

.ctb-package-features {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.ctb-package-features li {
    font-size: 13px;
    color: #495057;
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.ctb-package-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--ctb-success);
    font-weight: bold;
}

/* ==========================================================================
   Vehicles Grid
   ========================================================================== */

.ctb-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0;
}

.ctb-vehicle-card {
    border: 2px solid var(--ctb-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.ctb-vehicle-card:hover {
    border-color: var(--ctb-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.ctb-vehicle-card.ctb-selected {
    border-color: var(--ctb-primary);
    box-shadow: 0 0 0 3px rgba(75, 61, 42, 0.1);
}

.ctb-vehicle-card.ctb-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ctb-vehicle-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #f0f0f0;
}

.ctb-vehicle-content {
    padding: 20px;
}

.ctb-vehicle-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--ctb-text);
    margin: 0 0 4px 0;
}

.ctb-vehicle-class {
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.ctb-vehicle-specs {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    font-size: 13px;
    color: #495057;
}

.ctb-vehicle-spec {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ctb-vehicle-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--ctb-primary);
    margin: 12px 0 0 0;
}

.ctb-vehicle-price-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 400;
}

/* ==========================================================================
   Discount Input
   ========================================================================== */

.ctb-discount-input {
    display: flex;
    gap: 10px;
}

.ctb-discount-input .ctb-input {
    flex: 1;
}

.ctb-discount-input .ctb-btn {
    flex-shrink: 0;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.ctb-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 14px;
}

.ctb-message.ctb-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ctb-message.ctb-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ctb-message.ctb-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ==========================================================================
   Checkbox
   ========================================================================== */

.ctb-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.ctb-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.ctb-account-option {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

/* ==========================================================================
   Form Actions
   ========================================================================== */

.ctb-form-actions {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--ctb-border);
}

/* ==========================================================================
   Payment Layout
   ========================================================================== */

.ctb-payment-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.ctb-payment-left {
    min-width: 0;
}

.ctb-payment-right {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.ctb-booking-summary {
    background: #f8f9fa;
    border: 2px solid var(--ctb-border);
    border-radius: 12px;
    padding: 24px;
}

.ctb-booking-summary h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ctb-text);
    margin: 0 0 20px 0;
}

#summary-content {
    font-size: 14px;
    color: #495057;
    margin-bottom: 20px;
    line-height: 1.8;
}

.ctb-price-breakdown {
    border-top: 2px solid var(--ctb-border);
    padding-top: 16px;
}

.ctb-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.ctb-price-row.ctb-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--ctb-primary);
    padding-top: 12px;
    margin-top: 12px;
    border-top: 2px solid var(--ctb-border);
}

.ctb-discount {
    color: var(--ctb-success);
}

/* ==========================================================================
   Stripe Payment Element
   ========================================================================== */

#payment-element {
    margin: 20px 0;
}

.ctb-terms {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ctb-terms a {
    color: var(--ctb-primary);
    text-decoration: underline;
}

/* ==========================================================================
   Loading Overlay
   ========================================================================== */

.ctb-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ctb-loading-overlay p {
    color: #fff;
    font-size: 18px;
    margin-top: 20px;
}

.ctb-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ctb-spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .ctb-payment-layout {
        grid-template-columns: 1fr;
    }

    .ctb-payment-right {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .ctb-booking-container {
        padding: 24px;
    }

    .ctb-title {
        font-size: 24px;
    }

    .ctb-booking-types {
        grid-template-columns: 1fr;
    }

    .ctb-form-row {
        flex-direction: column;
        gap: 0;
    }

    .ctb-vehicles-grid,
    .ctb-packages-grid {
        grid-template-columns: 1fr;
    }

    .ctb-progress-bar {
        flex-wrap: wrap;
    }

    .ctb-step-label {
        font-size: 12px;
    }

    .ctb-form-actions {
        flex-direction: column;
    }

    .ctb-form-actions .ctb-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .ctb-booking-wrapper {
        padding: 20px 10px;
    }

    .ctb-booking-container {
        padding: 16px;
    }

    .ctb-header {
        margin-bottom: 24px;
    }

    .ctb-title {
        font-size: 20px;
    }

    .ctb-subtitle {
        font-size: 14px;
    }
}

/* ==========================================================================
   Google Maps Autocomplete Dropdown
   ========================================================================== */

.pac-container {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
    margin-top: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.pac-item {
    padding: 12px 16px;
    cursor: pointer;
    border-top: 1px solid #f0f0f0;
}

.pac-item:first-child {
    border-top: none;
}

.pac-item:hover {
    background: #f8f9fa;
}

.pac-icon {
    margin-top: 8px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.ctb-text-center {
    text-align: center;
}

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

.ctb-mt-20 {
    margin-top: 20px;
}

.ctb-mb-20 {
    margin-bottom: 20px;
}

.ctb-p-20 {
    padding: 20px;
}
