/* ══════════════════════════════════════
   TAXI PLUGIN — FRONTEND STYLES
══════════════════════════════════════ */

.taxi-wrap * { box-sizing: border-box; }

.taxi-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 860px;
    margin: 0 auto;
    padding: 16px;
}

/* ─── Form Card ─── */
.taxi-form-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.taxi-form-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1a1a2e;
}

/* ─── Fields ─── */
.taxi-field-group {
    position: relative;
    margin-bottom: 14px;
}

.taxi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.taxi-field {
    position: relative;
    display: flex;
    align-items: center;
    background: #f7f8fc;
    border: 1.5px solid #e2e5f1;
    border-radius: 10px;
    padding: 10px 14px;
    transition: border-color .2s;
}

.taxi-field:focus-within {
    border-color: #4f46e5;
    background: #fff;
}

.taxi-field-icon {
    font-size: 16px;
    margin-right: 10px;
    flex-shrink: 0;
}

.taxi-field input,
.taxi-field select {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #1a1a2e;
    outline: none;
    min-width: 0;
}

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

/* ─── Swap button ─── */
.taxi-swap-btn {
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    background: #4f46e5;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(79,70,229,.35);
    transition: transform .25s, background .2s;
}

.taxi-swap-btn:hover {
    background: #4338ca;
    transform: translateY(-50%) rotate(180deg);
}

/* ─── Dropdown ─── */
.taxi-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid #e2e5f1;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 999;
    max-height: 280px;
    overflow-y: auto;
}

.taxi-dd-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
}

.taxi-dd-item:hover { background: #f0f4ff; }

.taxi-dd-main { font-size: 14px; color: #1a1a2e; }
.taxi-dd-sub  { font-size: 12px; color: #9ca3af; margin-top: 2px; }

.taxi-dd-header {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    background: #f9fafb;
    letter-spacing: .5px;
}

.taxi-airport-chip { color: #4f46e5; font-weight: 500; }
.taxi-dd-loading   { padding: 12px 14px; color: #9ca3af; font-size: 14px; }

/* ─── Primary Button ─── */
.taxi-btn-primary {
    width: 100%;
    padding: 14px;
    background: #4f46e5;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 6px;
    transition: background .2s, transform .1s;
}

.taxi-btn-primary:hover   { background: #4338ca; }
.taxi-btn-primary:active  { transform: scale(.98); }
.taxi-btn-primary:disabled{ background: #9ca3af; cursor: not-allowed; }

/* ─── Messages ─── */
.taxi-msg {
    padding: 14px 18px;
    border-radius: 10px;
    margin-top: 14px;
    font-size: 15px;
}

.taxi-msg-error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.taxi-msg-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* ─── Results Header ─── */
.taxi-results { margin-top: 24px; }

.taxi-results-header {
    margin-bottom: 16px;
}

.taxi-results-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.taxi-results-route {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

/* ─── Car Cards Grid ─── */
.taxi-cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.taxi-car-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.09);
    overflow: hidden;
    border: 1.5px solid #f1f3f9;
    transition: box-shadow .2s, transform .2s;
}

.taxi-car-card:hover {
    box-shadow: 0 6px 24px rgba(79,70,229,0.15);
    transform: translateY(-2px);
}

.taxi-car-img-wrap {
    width: 100%;
    height: 160px;
    background: #f7f8fc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.taxi-car-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.taxi-car-img-placeholder {
    font-size: 64px;
    opacity: .4;
}

.taxi-car-body {
    padding: 16px;
}

.taxi-car-name {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.taxi-car-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
}

/* ─── Price Boxes ─── */
.taxi-price-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.taxi-price-box {
    flex: 1;
    background: #f7f8fc;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    border: 1.5px solid #e2e5f1;
}

.taxi-price-return {
    background: #f0f4ff;
    border-color: #c7d2fe;
}

.taxi-price-label {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 4px;
}

.taxi-price-val {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
}

.taxi-price-return .taxi-price-val { color: #4f46e5; }

/* ─── Book Button ─── */
.taxi-book-btn {
    width: 100%;
    padding: 12px;
    background: #1a1a2e;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
}

.taxi-book-btn:hover    { background: #4f46e5; }
.taxi-book-btn:disabled { background: #9ca3af; cursor: not-allowed; }

/* ─── Booking Form ─── */
.taxi-booking-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.taxi-booking-summary {
    display: flex;
    gap: 20px;
    background: #f7f8fc;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 24px;
    border: 1.5px solid #e2e5f1;
}

.taxi-booking-car-img {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.taxi-booking-info h3  { margin: 0 0 8px; font-size: 18px; }
.taxi-booking-info p   { margin: 4px 0; font-size: 14px; color: #374151; }
.taxi-price-total      { font-size: 16px !important; margin-top: 8px !important; }

.taxi-booking-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.taxi-booking-card textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e5f1;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    outline: none;
}

.taxi-booking-card textarea:focus { border-color: #4f46e5; }

/* ─── Success Card ─── */
.taxi-success-card {
    text-align: center;
    padding: 48px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.taxi-success-icon { font-size: 56px; margin-bottom: 16px; }
.taxi-success-card h2 { font-size: 24px; color: #16a34a; }

/* ─── Mobile ─── */
@media (max-width: 600px) {
    .taxi-row            { grid-template-columns: 1fr; }
    .taxi-booking-summary{ flex-direction: column; }
    .taxi-booking-car-img{ width: 100%; height: 180px; }
    .taxi-cars-grid      { grid-template-columns: 1fr; }
    .taxi-form-card,
    .taxi-booking-card   { padding: 18px; }
}
