/* SmartCab Booking Plugin - Theme Independent Styles */
/* All classes prefixed with smartcab- or scb- to prevent theme conflicts */

.smartcab-booking-wrap {
    font-family: inherit;
    color: inherit;
    background: var(--scb-bg, #fff);
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.smartcab-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
    position: relative;
}

.smartcab-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.smartcab-stepper .scb-step-item {
    flex: 1;
    text-align: center;
    position: relative;
    font-family: inherit;
    color: inherit;
    z-index: 1;
    background: var(--scb-bg, #fff);
    padding: 0 10px;
}

.smartcab-stepper .scb-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
    font-family: inherit;
    color: #666;
}

.smartcab-stepper .scb-step-item.scb-active .scb-step-number {
    border-color: var(--scb-primary, #FFD700);
    background: var(--scb-primary, #FFD700);
    color: #000;
}

.smartcab-stepper .scb-step-item.scb-completed .scb-step-number {
    border-color: var(--scb-primary, #FFD700);
    background: var(--scb-primary, #FFD700);
    color: #000;
}

.smartcab-stepper .scb-step-item.scb-completed .scb-step-number::after {
    content: '✓';
}

.smartcab-stepper .scb-step-label {
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: inherit;
}

.smartcab-stepper .scb-step-item.scb-active .scb-step-label {
    color: var(--scb-primary, #FFD700);
    font-weight: 600;
}

.scb-step {
    display: none;
}

.scb-step.scb-active {
    display: block;
}

.scb-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .scb-grid {
        grid-template-columns: 1fr;
    }
}

.scb-left, .scb-right {
    font-family: inherit;
}

.scb-left label,
.scb-left h3 {
    font-family: var(--scb-label-font, inherit);
    color: inherit;
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.scb-left input,
.scb-left select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--scb-input-font, inherit);
    background: var(--scb-input, #fff);
    color: inherit;
    font-size: inherit;
}

/* Override for input fields with icons */
.scb-left .scb-input-with-icon input {
    margin-bottom: 0;
}

/* Flatpickr styling */
.scb-flatpickr-date,
.scb-flatpickr-time {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.flatpickr-calendar {
    z-index: 999999 !important;
}

.scb-input-with-icon {
    position: relative;
    display: block;
    margin-bottom: 1rem;
    width: 100%;
}

.scb-input-with-icon .scb-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--scb-primary, #FFD700);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 10;
    line-height: 1;
    display: block;
    width: auto;
    height: auto;
}

.scb-input-with-icon .scb-icon-pickup {
    color: #4CAF50 !important; /* Green for pickup */
}

.scb-input-with-icon .scb-icon-dropoff {
    color: #F44336 !important; /* Red for dropoff */
}

.scb-input-with-icon input[type="text"],
.scb-input-with-icon input#scb-pickup,
.scb-input-with-icon input#scb-dropoff {
    padding-left: 42px !important;
    padding-right: 12px !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.scb-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.scb-col-half {
    display: flex;
    flex-direction: column;
}

.scb-distance-display {
    margin-top: 1rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 4px;
    font-family: inherit;
}

#scb-map {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.scb-step-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.scb-step-actions .button,
.scb-step-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    background: var(--scb-primary, #FFD700);
    color: #000;
    font-weight: 500;
}

.scb-step-actions .button:hover,
.scb-step-actions button:hover {
    opacity: 0.9;
}

.scb-step-actions .button-black {
    background: #000;
    color: #fff;
}

.scb-step-actions .button-dark {
    background: #333;
    color: #fff;
}

.scb-step2-layout,
.scb-step3-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .scb-step2-layout,
    .scb-step3-layout {
        grid-template-columns: 1fr;
    }
}

.scb-vehicle-grid-step2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Mobile view - keep original grid layout */
@media (max-width: 768px) {
    .scb-vehicle-grid-step2 {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Quote step vehicle grid */
.scb-vehicle-grid-quote {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.scb-vehicle-item-quote {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    background: #fff;
    transition: all 0.3s ease;
    cursor: default;
}

.scb-vehicle-item-quote img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.scb-vehicle-item-quote .scb-vehicle-info {
    flex: 1;
}

.scb-vehicle-item-quote .scb-vehicle-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.scb-vehicle-item-quote .scb-vehicle-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
}

.scb-vehicle-item-quote.scb-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.scb-vehicle-item {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    background: var(--scb-input, #fff);
}

/* Hide any data attributes from being displayed */
.scb-vehicle-item[data-vehicle-id]::before,
.scb-vehicle-item[data-vehicle-id]::after {
    content: none !important;
    display: none !important;
}

.scb-vehicle-item:hover {
    border-color: var(--scb-primary, #FFD700);
}

.scb-vehicle-item.scb-selected {
    border-color: var(--scb-primary, #FFD700);
    background: rgba(255, 215, 0, 0.1);
}

.scb-vehicle-item.scb-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.scb-summary-full,
.scb-summary {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: inherit;
}

.scb-summary-full h4,
.scb-summary h4 {
    font-family: inherit;
    color: inherit;
    margin-top: 0;
    margin-bottom: 1rem;
}

.scb-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    font-family: inherit;
    color: inherit;
}

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

.scb-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 2px solid #333;
    font-weight: bold;
    font-family: inherit;
    color: inherit;
    font-size: 1.2em;
}

.scb-extras-list {
    font-family: inherit;
}

.scb-extra-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    background: var(--scb-input, #fff);
}

.scb-extra-item input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Loading states */
.scb-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: var(--scb-primary, #FFD700);
    animation: scb-spin 0.8s linear infinite;
}

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

.scb-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 4px;
}

.scb-error-message {
    background: #fee;
    color: #c33;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #c33;
    font-family: inherit;
}

.scb-success-message {
    background: #efe;
    color: #3c3;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border-left: 4px solid #3c3;
    font-family: inherit;
}

/* Vehicle card enhancements */
.scb-vehicle-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.scb-vehicle-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.scb-vehicle-item .scb-vehicle-info {
    flex: 1;
}

.scb-vehicle-item .scb-vehicle-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-family: inherit;
    color: inherit;
}

.scb-vehicle-item .scb-vehicle-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #666;
    font-family: inherit;
}

.scb-vehicle-item .scb-vehicle-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--scb-primary, #FFD700);
    font-family: inherit;
}

/* Disabled states */
.scb-step-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Animations */
.scb-step {
    animation: scb-fadeIn 0.3s ease-in;
}

@keyframes scb-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .smartcab-stepper {
        flex-wrap: wrap;
    }
    
    .smartcab-stepper .scb-step-item {
        flex: 0 0 50%;
        margin-bottom: 1rem;
    }
    
    .scb-vehicle-item {
        flex-direction: column;
        text-align: center;
    }
    
    .scb-vehicle-item img {
        width: 100%;
        height: auto;
        max-height: 150px;
    }
}

/* Extra item enhancements */
.scb-extra-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    font-family: inherit;
}

.scb-extra-item label:hover {
    background: rgba(255, 215, 0, 0.1);
}

.scb-extra-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
}

.scb-extra-item .scb-extra-price {
    margin-left: auto;
    font-weight: bold;
    color: var(--scb-primary, #FFD700);
    font-family: inherit;
}

/* Map container enhancements */
#scb-map {
    min-height: 400px;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

/* Summary enhancements */
.scb-summary-full {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* Form validation styles */
.scb-left input:invalid,
.scb-left select:invalid {
    border-color: #c33;
}

.scb-left input:valid,
.scb-left select:valid {
    border-color: #3c3;
}

/* Ensure theme compatibility */
.smartcab-booking-wrap * {
    box-sizing: border-box;
}

.smartcab-booking-wrap input:focus,
.smartcab-booking-wrap select:focus {
    outline: 2px solid var(--scb-primary, #FFD700);
    outline-offset: 2px;
}

/* Hide step navigation on mobile if needed */
@media (max-width: 480px) {
    .smartcab-stepper .scb-step-label {
        font-size: 0.75rem;
    }
    
    .smartcab-stepper .scb-step-number {
        width: 30px;
        height: 30px;
        font-size: 0.875rem;
    }
}

/* 24-Hour Booking Modal Styles */
.scb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.scb-modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    text-align: center;
    padding: 0;
}

.scb-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1;
}

.scb-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.scb-modal-header {
    background: #FFD700;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    margin: 0;
}

.scb-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.scb-modal-body {
    padding: 30px 25px;
}

.scb-modal-body > p:first-child {
    margin: 0 0 25px 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.scb-contact-info {
    margin: 25px 0;
    text-align: left;
}

.scb-contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.scb-contact-item:hover {
    background: #f0f0f0;
}

.scb-contact-item:last-child {
    margin-bottom: 0;
}

.scb-contact-item i {
    font-size: 1.25rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.scb-contact-item .fa-phone {
    color: #333;
}

.scb-contact-item .fa-whatsapp {
    color: #25D366;
}

.scb-contact-item .fa-envelope {
    color: #333;
}

.scb-contact-item span {
    font-size: 1rem;
    color: #333;
    flex: 1;
}

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

.scb-contact-item a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.scb-modal-footer-text {
    margin: 20px 0 0 0;
    font-size: 0.95rem;
    color: #666;
    font-style: italic;
}

@media (max-width: 480px) {
    .scb-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .scb-modal-header h3 {
        font-size: 1.25rem;
    }
    
    .scb-modal-body {
        padding: 20px 15px;
    }
    
    .scb-contact-item {
        padding: 10px;
    }
    
    .scb-contact-item span {
        font-size: 0.9rem;
    }
}

