/**
 * Frontend Styles - Booking.com Style
 *
 * @package ChauffeurBooking
 */

:root {
    --primary-color: #0071c2;
    --primary-hover: #00509d;
    --orange-color: #F58633;
    --orange-hover: #d97429;
    --text-dark: #1a1a1a;
    --text-light: #6b6b6b;
    --border-color: #bfc0c2;
    --bg-light: #f5f5f5;
}

/* Reset */
.cb-booking-form-wrapper * {
    box-sizing: border-box;
}

/* Booking Form Wrapper */
.cb-booking-form-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Booking.com Style Form Container */
.cb-booking-form {
    background: #febb02;
    border: 3px solid #febb02;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Horizontal Form Layout - Booking.com Style */
.cb-form-horizontal {
    display: flex;
    gap: 0;
    align-items: stretch;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

/* Form Field - Booking.com Style */
.cb-form-field {
    flex: 1;
    min-width: 0;
    position: relative;
    border-right: 1px solid #e0e0e0;
}

.cb-form-field:last-child {
    border-right: none;
    flex: 0 0 auto;
}

/* Label - Booking.com Style */
.cb-form-field label {
    display: block;
    padding: 8px 12px 4px;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 12px;
    line-height: 1.2;
    margin: 0;
}

.cb-form-field .required {
    color: #cc0000;
}

/* Input Fields - Booking.com Style */
.cb-form-field input[type="text"],
.cb-form-field input[type="date"],
.cb-form-field input[type="time"],
.cb-form-field select {
    width: 100%;
    padding: 4px 12px 12px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    outline: none;
    appearance: none;
}

.cb-form-field input::placeholder {
    color: #6b6b6b;
    font-weight: 400;
}

.cb-form-field input:focus,
.cb-form-field select:focus {
    background: #f5f5f5;
}

/* Location Input with Icon */
.cb-location-input {
    position: relative;
}

.cb-location-icon {
    position: absolute;
    left: 12px;
    top: 32px;
    font-size: 16px;
    color: #6b6b6b;
    pointer-events: none;
}

.cb-location-input input {
    padding-left: 32px !important;
}

/* Select Dropdown */
.cb-form-field select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a1a1a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Search Button - Booking.com Blue */
.cb-form-field .cb-btn {
    width: 100%;
    height: 100%;
    padding: 0 32px;
    border: none;
    background: var(--primary-color);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
    min-height: 56px;
}

.cb-form-field .cb-btn:hover {
    background: var(--primary-hover);
}

/* Google Autocomplete Dropdown */
.pac-container {
    border-radius: 4px;
    border: 1px solid #bfc0c2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    margin-top: 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    z-index: 9999 !important;
}

.pac-item {
    padding: 10px 14px;
    border-top: 1px solid #e7e7e7;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

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

.pac-item:hover,
.pac-item-selected {
    background-color: #f5f5f5;
}

.pac-icon {
    margin-right: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%236b6b6b' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}

.pac-item-query {
    font-weight: 600;
    color: #1a1a1a;
}

.pac-matched {
    font-weight: 700;
}

/* Loader */
.cb-btn-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Search Summary Bar */
.cb-search-summary {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cb-search-summary h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
}

.cb-search-summary p {
    margin: 0;
    font-size: 14px;
    color: #6b6b6b;
}

.cb-modify-search {
    padding: 8px 16px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    display: inline-block;
    transition: background 0.2s;
}

.cb-modify-search:hover {
    background: var(--primary-hover);
    color: #fff;
}

/* Vehicle Results */
.cb-vehicle-results {
    margin-top: 24px;
}

.cb-results-header {
    margin-bottom: 20px;
}

.cb-results-count {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.cb-results-count span {
    color: var(--primary-color);
}

/* Vehicle Grid */
.cb-vehicles-grid {
    display: grid;
    gap: 16px;
}

/* Vehicle Card - Booking.com Style */
.cb-vehicle-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    display: grid;
    grid-template-columns: 280px 1fr;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.cb-vehicle-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #febb02;
}

/* Vehicle Image */
.cb-vehicle-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.cb-vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Vehicle Info */
.cb-vehicle-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.cb-vehicle-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--primary-color);
}

.cb-vehicle-description {
    color: #6b6b6b;
    margin: 0 0 16px;
    line-height: 1.5;
    font-size: 14px;
}

/* Vehicle Specs */
.cb-vehicle-specs {
    display: flex;
    gap: 20px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.cb-vehicle-spec {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #1a1a1a;
}

.cb-vehicle-spec-icon {
    font-size: 18px;
}

/* Vehicle Footer */
.cb-vehicle-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

/* Price Display */
.cb-vehicle-price {
    display: flex;
    flex-direction: column;
}

.cb-price-label {
    font-size: 12px;
    color: #6b6b6b;
    margin-bottom: 4px;
}

.cb-price-amount {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Select Button */
.cb-select-vehicle {
    padding: 12px 24px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.cb-select-vehicle:hover {
    background: var(--primary-hover);
}

/* Error Message */
.cb-error-message {
    background: #fff5f5;
    border: 1px solid #ff4444;
    border-radius: 4px;
    padding: 16px 20px;
    margin: 20px 0;
    color: #cc0000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-error-icon {
    font-size: 24px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .cb-form-horizontal {
        flex-direction: column;
    }

    .cb-form-field {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .cb-form-field:last-child {
        border-bottom: none;
    }

    .cb-form-field label {
        padding: 12px 16px 4px;
    }

    .cb-form-field input,
    .cb-form-field select {
        padding: 4px 16px 12px;
    }

    .cb-location-input input {
        padding-left: 40px !important;
    }

    .cb-location-icon {
        left: 16px;
    }

    .cb-form-field .cb-btn {
        min-height: 48px;
    }

    .cb-vehicle-card {
        grid-template-columns: 1fr;
    }

    .cb-vehicle-image-wrapper {
        height: 200px;
    }

    .cb-vehicle-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .cb-select-vehicle {
        width: 100%;
    }
}

/* Passenger/Bags Selector - Booking.com Style */
.cb-passenger-selector {
    position: relative;
}

.cb-passenger-display {
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transition: all 0.3s;
}

.cb-passenger-display:hover {
    border-color: var(--primary-color);
}

.cb-passenger-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none;
}

.cb-passenger-dropdown.active {
    display: block;
}

.cb-counter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.cb-counter-row:last-child {
    border-bottom: none;
}

.cb-counter-label {
    font-weight: 600;
    color: var(--text-dark);
}

.cb-counter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cb-counter-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    background: #fff;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

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

.cb-counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cb-counter-value {
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}

/* Vehicle Results Page */
.cb-vehicle-results {
    margin-top: 40px;
}

.cb-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.cb-results-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.cb-results-count span {
    color: var(--primary-color);
}

.cb-vehicles-grid {
    display: grid;
    gap: 24px;
}

.cb-vehicle-card {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    gap: 20px;
}

.cb-vehicle-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(245, 134, 51, 0.15);
    transform: translateY(-2px);
}

.cb-vehicle-image-wrapper {
    flex: 0 0 280px;
    position: relative;
    overflow: hidden;
}

.cb-vehicle-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cb-vehicle-card:hover .cb-vehicle-image {
    transform: scale(1.05);
}

.cb-vehicle-info {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.cb-vehicle-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text-dark);
}

.cb-vehicle-description {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.cb-vehicle-specs {
    display: flex;
    gap: 24px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.cb-vehicle-spec {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.cb-vehicle-spec-icon {
    font-size: 20px;
    color: var(--primary-color);
}

.cb-vehicle-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.cb-vehicle-price {
    display: flex;
    flex-direction: column;
}

.cb-price-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cb-price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.cb-select-vehicle {
    padding: 12px 32px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cb-select-vehicle:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 134, 51, 0.3);
}

/* Status Badges */
.cb-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.cb-status-pending { background: #fef5e7; color: #f39c12; }
.cb-status-confirmed { background: #d4edda; color: #28a745; }
.cb-status-completed { background: #d1ecf1; color: #0c5460; }
.cb-status-cancelled { background: #f8d7da; color: #721c24; }

/* Error Messages */
.cb-error-message {
    background: #fff5f5;
    border: 2px solid #ff4444;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 20px 0;
    color: #cc0000;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cb-error-icon {
    font-size: 24px;
}

/* Responsive */
@media (max-width: 968px) {
    .cb-form-horizontal {
        flex-direction: column;
        align-items: stretch;
    }

    .cb-form-field {
        min-width: 100%;
    }

    .cb-vehicle-card {
        flex-direction: column;
    }

    .cb-vehicle-image-wrapper {
        flex: 0 0 200px;
    }

    .cb-vehicle-footer {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .cb-select-vehicle {
        width: 100%;
    }
}

