/**
 * RMC Taxi Public Styles
 * Version: 1.9beta
 * Blacklane-inspired design
 */

/* ==========================================
   WRAPPER & GENERAL
   ========================================== */

.rmc-taxi-wrapper {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.rmc-taxi-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.rmc-taxi-disabled,
.rmc-taxi-error {
    padding: 40px;
    text-align: center;
    background: #fff3cd;
    border-radius: 12px;
    color: #856404;
}

.rmc-taxi-error {
    background: #f8d7da;
    color: #721c24;
}

/* ==========================================
   PROGRESS STEPS
   ========================================== */

.rmc-taxi-progress {
    display: flex;
    background: #1a1a2e;
    padding: 20px 30px;
}

.rmc-taxi-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.rmc-taxi-step.active {
    opacity: 1;
}

.rmc-taxi-step.completed {
    opacity: 0.8;
}

.rmc-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.rmc-taxi-step.active .rmc-step-num {
    background: #f0b429;
    color: #1a1a2e;
}

.rmc-taxi-step.completed .rmc-step-num {
    background: #10b981;
}

.rmc-step-label {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

/* ==========================================
   PANELS
   ========================================== */

.rmc-taxi-panel {
    display: none;
    padding: 30px;
}

.rmc-taxi-panel.active {
    display: block;
}

.rmc-taxi-panel-title {
    margin: 0 0 25px 0;
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
}

/* ==========================================
   FORM FIELDS
   ========================================== */

.rmc-taxi-field {
    margin-bottom: 20px;
}

.rmc-taxi-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.rmc-field-icon {
    margin-right: 6px;
}

.rmc-taxi-field input[type="text"],
.rmc-taxi-field input[type="email"],
.rmc-taxi-field input[type="tel"],
.rmc-taxi-field select,
.rmc-taxi-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    box-sizing: border-box;
}

.rmc-taxi-field input:focus,
.rmc-taxi-field select:focus,
.rmc-taxi-field textarea:focus {
    outline: none;
    border-color: #f0b429;
    box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.1);
}

.rmc-taxi-field input::placeholder {
    color: #9ca3af;
}

.rmc-taxi-field input:disabled,
.rmc-taxi-field select:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

/* Row layout */
.rmc-taxi-row {
    display: flex;
    gap: 15px;
}

.rmc-taxi-field-half {
    flex: 1;
}

.rmc-taxi-datetime {
    display: flex;
    gap: 15px;
}

/* ==========================================
   ROUTE INFO
   ========================================== */

.rmc-taxi-route-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
}

.rmc-route-detail {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rmc-route-icon {
    font-size: 18px;
}

.rmc-route-label {
    color: #64748b;
    font-size: 13px;
}

.rmc-route-value {
    font-weight: 600;
    color: #0369a1;
}

/* ==========================================
   CALENDAR
   ========================================== */

.rmc-taxi-datepicker {
    cursor: pointer;
}

.rmc-taxi-calendar-container {
    display: none;
    position: absolute;
    z-index: 1000;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 20px;
    margin-top: 5px;
    min-width: 300px;
}

.rmc-taxi-calendar-container.open {
    display: block;
}

.rmc-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.rmc-calendar-title {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a2e;
}

.rmc-calendar-nav {
    display: flex;
    gap: 10px;
}

.rmc-calendar-nav button {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.rmc-calendar-nav button:hover {
    background: #e5e7eb;
}

.rmc-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.rmc-calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    padding: 5px;
}

.rmc-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.rmc-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

.rmc-calendar-day:hover:not(.disabled):not(.empty) {
    background: #fef3c7;
}

.rmc-calendar-day.available {
    background: #d1fae5;
    color: #065f46;
    font-weight: 500;
}

.rmc-calendar-day.available:hover {
    background: #a7f3d0;
}

.rmc-calendar-day.selected {
    background: #f0b429 !important;
    color: #1a1a2e !important;
    font-weight: 600;
}

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

.rmc-calendar-day.empty {
    cursor: default;
}

.rmc-calendar-day.today {
    border: 2px solid #f0b429;
}

/* ==========================================
   PRICE BOX
   ========================================== */

.rmc-taxi-price-box {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    color: #fff;
}

.rmc-price-header {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.rmc-price-breakdown {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.rmc-price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.rmc-price-row.rmc-price-extras {
    color: #fbbf24;
}

.rmc-price-row.rmc-price-total {
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: 10px;
    padding-top: 15px;
    font-size: 20px;
    font-weight: 700;
}

.rmc-price-extras-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    opacity: 0.8;
}

.rmc-extra-applied {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

/* ==========================================
   BUTTONS
   ========================================== */

.rmc-taxi-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.rmc-taxi-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rmc-taxi-btn-next,
.rmc-taxi-btn-submit {
    background: #f0b429;
    color: #1a1a2e;
}

.rmc-taxi-btn-next:hover:not(:disabled),
.rmc-taxi-btn-submit:hover:not(:disabled) {
    background: #d99f1f;
    transform: translateY(-1px);
}

.rmc-taxi-btn-next:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.rmc-taxi-btn-back {
    background: #f3f4f6;
    color: #374151;
    flex: 0 0 auto;
}

.rmc-taxi-btn-back:hover {
    background: #e5e7eb;
}

.rmc-btn-arrow {
    font-size: 18px;
}

.rmc-btn-icon {
    font-size: 18px;
}

/* ==========================================
   BOOKING SUMMARY
   ========================================== */

.rmc-taxi-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
}

.rmc-taxi-summary h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #1a1a2e;
}

.rmc-summary-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.rmc-summary-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.rmc-summary-label {
    color: #64748b;
    font-size: 13px;
    min-width: 50px;
}

.rmc-summary-value {
    flex: 1;
    font-weight: 500;
    color: #1a1a2e;
    word-break: break-word;
}

.rmc-summary-total {
    background: #1a1a2e;
    margin: 15px -20px -20px -20px;
    padding: 15px 20px;
    border-radius: 0 0 12px 12px;
}

.rmc-summary-total .rmc-summary-label,
.rmc-summary-total .rmc-summary-value {
    color: #fff;
}

.rmc-summary-total .rmc-summary-value {
    font-size: 20px;
    font-weight: 700;
    color: #f0b429;
}

/* ==========================================
   SUCCESS MESSAGE
   ========================================== */

.rmc-taxi-success {
    text-align: center;
    padding: 60px 30px;
}

.rmc-success-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.rmc-taxi-success h3 {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: #065f46;
}

.rmc-taxi-success p {
    color: #64748b;
    margin: 0 0 10px 0;
}

.rmc-booking-number {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 8px;
    padding: 15px 25px;
    display: inline-block;
    margin: 20px 0 30px 0;
    font-size: 14px;
    color: #374151;
}

.rmc-booking-number strong {
    display: block;
    font-size: 24px;
    color: #065f46;
    margin-top: 5px;
    letter-spacing: 2px;
}

/* ==========================================
   LOADING STATE
   ========================================== */

.rmc-taxi-loading {
    position: relative;
    pointer-events: none;
}

.rmc-taxi-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rmc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #f0b429;
    border-radius: 50%;
    animation: rmc-spin 0.8s linear infinite;
}

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

/* ==========================================
   GOOGLE AUTOCOMPLETE CUSTOMIZATION
   ========================================== */

.pac-container {
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
    margin-top: 5px;
    font-family: inherit;
}

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

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

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

.pac-item-query {
    font-size: 14px;
    color: #1a1a2e;
}

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

/* ==========================================
   RESPONSIVE
   ========================================== */

@media screen and (max-width: 600px) {
    .rmc-taxi-wrapper {
        margin: 0 15px;
    }
    
    .rmc-taxi-panel {
        padding: 20px;
    }
    
    .rmc-taxi-progress {
        padding: 15px 20px;
    }
    
    .rmc-step-label {
        display: none;
    }
    
    .rmc-taxi-row,
    .rmc-taxi-datetime {
        flex-direction: column;
        gap: 0;
    }
    
    .rmc-taxi-route-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .rmc-taxi-actions {
        flex-direction: column;
    }
    
    .rmc-taxi-btn-back {
        order: 2;
    }
    
    .rmc-taxi-panel-title {
        font-size: 18px;
    }
    
    .rmc-calendar-container {
        left: 10px;
        right: 10px;
        min-width: auto;
    }
}

/* ==========================================
   DARK MODE SUPPORT (optional)
   ========================================== */

@media (prefers-color-scheme: dark) {
    .rmc-taxi-form {
        /* Keeping light mode for booking forms */
    }
}

/* ==========================================
   v1.12beta - ROMA PRICING STYLES
   ========================================== */

/* Fixed Rate Badge */
.rmc-price-fixed-rate {
    text-align: center;
    padding: 15px 0;
}

.rmc-fixed-badge {
    display: inline-block;
    background: #10b981;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.rmc-fixed-route {
    color: #fff;
    font-size: 14px;
    opacity: 0.9;
}

/* Price breakdown rows */
.rmc-price-row.rmc-price-minimum {
    color: #f59e0b;
    font-style: italic;
}

.rmc-price-row.rmc-price-maximum {
    color: #ef4444;
    font-style: italic;
}

/* Price notes */
.rmc-price-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.rmc-price-notes small {
    display: block;
    margin-bottom: 3px;
}

/* Passengers/Luggage info in summary */
.rmc-summary-passengers {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.rmc-summary-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
