/* =========================================
   Transfer Booking System — Frontend Styles
   ========================================= */

:root {
    --tbs-primary: #1a1a2e;
    --tbs-accent: #e94560;
    --tbs-accent-hover: #c73652;
    --tbs-success: #2e7d32;
    --tbs-warning: #e65100;
    --tbs-bg: #f8f9fa;
    --tbs-white: #ffffff;
    --tbs-border: #dee2e6;
    --tbs-text: #333333;
    --tbs-text-light: #6c757d;
    --tbs-radius: 12px;
    --tbs-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --tbs-transition: 0.25s ease;
}

.tbs-wrapper {
    max-width: 820px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--tbs-text);
}

/* ===== ADIM GÖSTERGESİ ===== */
.tbs-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 0;
}

.tbs-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.tbs-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tbs-border);
    color: var(--tbs-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    transition: all var(--tbs-transition);
}

.tbs-step.active .tbs-step-icon {
    background: var(--tbs-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(233,69,96,0.4);
}

.tbs-step.completed .tbs-step-icon {
    background: var(--tbs-success);
    color: #fff;
}

.tbs-step.completed .tbs-step-icon::after {
    content: '✓';
}

.tbs-step span {
    font-size: 12px;
    color: var(--tbs-text-light);
    font-weight: 500;
}

.tbs-step.active span,
.tbs-step.completed span {
    color: var(--tbs-text);
    font-weight: 600;
}

.tbs-step-line {
    flex: 1;
    height: 2px;
    background: var(--tbs-border);
    margin: 0 8px;
    margin-bottom: 20px;
    max-width: 100px;
}

/* ===== PANEL ===== */
.tbs-step-panel {
    display: none;
    background: var(--tbs-white);
    border-radius: var(--tbs-radius);
    padding: 32px;
    box-shadow: var(--tbs-shadow);
    border: 1px solid var(--tbs-border);
    animation: tbsFadeIn 0.3s ease;
}

.tbs-step-panel.active {
    display: block;
}

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

.tbs-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--tbs-primary);
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--tbs-bg);
}

/* ===== FORM ELEMANLARI ===== */
.tbs-form-row { margin-bottom: 18px; }

.tbs-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tbs-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tbs-form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--tbs-text);
}

.tbs-input {
    padding: 12px 16px;
    border: 1.5px solid var(--tbs-border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color var(--tbs-transition), box-shadow var(--tbs-transition);
    outline: none;
    background: var(--tbs-white);
    color: var(--tbs-text);
    width: 100%;
    box-sizing: border-box;
}

.tbs-input:focus {
    border-color: var(--tbs-accent);
    box-shadow: 0 0 0 3px rgba(233,69,96,0.12);
}

.tbs-textarea {
    resize: vertical;
    min-height: 80px;
}

.tbs-required { color: var(--tbs-accent); }
.tbs-optional { font-size: 12px; color: var(--tbs-text-light); font-weight: 400; }

/* ===== KONUM GİRİŞİ ===== */
.tbs-input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tbs-input-icon {
    position: absolute;
    left: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: white;
    z-index: 1;
    pointer-events: none;
}

.tbs-icon-pickup  { background: #2e7d32; }
.tbs-icon-dropoff { background: var(--tbs-accent); }

.tbs-input-icon-wrapper .tbs-input {
    padding-left: 46px;
}

/* ===== MESAFE ROZETI ===== */
.tbs-distance-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    border: 1px solid #c8e6c9;
}

/* ===== ARAÇ GRID ===== */
.tbs-vehicles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.tbs-vehicle-card {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--tbs-border);
    border-radius: var(--tbs-radius);
    cursor: pointer;
    transition: all var(--tbs-transition);
    background: var(--tbs-white);
}

.tbs-vehicle-card:hover {
    border-color: var(--tbs-accent);
    box-shadow: 0 4px 16px rgba(233,69,96,0.15);
    transform: translateY(-2px);
}

.tbs-vehicle-card.selected {
    border-color: var(--tbs-accent);
    background: #fff5f7;
    box-shadow: 0 4px 20px rgba(233,69,96,0.2);
}

.tbs-vehicle-img {
    width: 130px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
    background: var(--tbs-bg);
}

.tbs-vehicle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tbs-vehicle-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.tbs-vehicle-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--tbs-primary);
    margin: 0 0 6px 0;
}

.tbs-vehicle-desc {
    font-size: 13px;
    color: var(--tbs-text-light);
    margin: 0 0 10px 0;
}

.tbs-vehicle-features {
    display: flex;
    gap: 12px;
}

.tbs-feature {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--tbs-text-light);
}

.tbs-vehicle-price {
    text-align: center;
    min-width: 110px;
}

.tbs-price-label {
    display: block;
    font-size: 11px;
    color: var(--tbs-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tbs-price-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--tbs-primary);
    line-height: 1.2;
}

.tbs-price-per-km {
    display: block;
    font-size: 11px;
    color: var(--tbs-text-light);
    margin-bottom: 10px;
}

/* ===== BUTONLAR ===== */
.tbs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--tbs-transition);
    text-decoration: none;
}

.tbs-btn-primary {
    background: var(--tbs-accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(233,69,96,0.3);
}

.tbs-btn-primary:hover {
    background: var(--tbs-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(233,69,96,0.4);
}

.tbs-btn-secondary {
    background: var(--tbs-bg);
    color: var(--tbs-text);
    border: 1.5px solid var(--tbs-border);
}

.tbs-btn-secondary:hover {
    background: #e9ecef;
}

.tbs-btn-select {
    background: var(--tbs-primary);
    color: #fff;
    padding: 9px 18px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--tbs-transition);
    width: 100%;
}

.tbs-btn-select:hover {
    background: var(--tbs-accent);
}

.tbs-btn-pay {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 16px;
    margin-top: 16px;
}

.tbs-form-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.tbs-form-actions-split {
    justify-content: space-between;
}

/* ===== ÖZET ===== */
.tbs-booking-summary {
    background: var(--tbs-bg);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid var(--tbs-border);
}

.tbs-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--tbs-border);
}

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

.tbs-summary-row span:first-child {
    color: var(--tbs-text-light);
    font-weight: 500;
}

.tbs-summary-row span:last-child {
    font-weight: 600;
    color: var(--tbs-text);
    max-width: 60%;
    text-align: right;
}

.tbs-summary-total {
    padding-top: 10px;
    margin-top: 6px;
}

.tbs-summary-total span:first-child {
    font-weight: 700;
    color: var(--tbs-text);
    font-size: 15px;
}

.tbs-summary-total span:last-child {
    font-size: 20px;
    color: var(--tbs-accent);
    font-weight: 800;
}

/* ===== ÖDEME ===== */
.tbs-payment-summary {
    background: #fff5f7;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid #fcc;
}

.tbs-stripe-container {
    padding: 20px;
    border: 1.5px solid var(--tbs-border);
    border-radius: 10px;
    background: var(--tbs-white);
}

.tbs-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    color: var(--tbs-text-light);
    justify-content: center;
}

.tbs-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--tbs-border);
    border-top-color: var(--tbs-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.tbs-spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

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

.tbs-stripe-error {
    color: #c62828;
    background: #ffebee;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
    border: 1px solid #ef9a9a;
}

.tbs-security-badges {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.tbs-badge {
    font-size: 12px;
    background: var(--tbs-bg);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--tbs-border);
    color: var(--tbs-text-light);
}

/* ===== UYARILER ===== */
.tbs-alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tbs-alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.tbs-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

/* ===== BAŞARI SAYFASI ===== */
.tbs-success-page {
    text-align: center;
    padding: 60px 40px;
}

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

.tbs-success-page h2 {
    font-size: 28px;
    color: var(--tbs-primary);
    margin-bottom: 12px;
}

.tbs-ref-code {
    font-size: 18px;
    color: var(--tbs-text-light);
    margin-bottom: 24px;
}

.tbs-ref-code strong {
    color: var(--tbs-accent);
    font-size: 22px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .tbs-step-panel { padding: 20px 16px; }
    .tbs-row-2 { grid-template-columns: 1fr; }

    .tbs-vehicle-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tbs-vehicle-img {
        width: 100%;
        height: 120px;
    }

    .tbs-vehicle-features { justify-content: center; }
    .tbs-vehicle-price { border-top: 1px solid var(--tbs-border); padding-top: 12px; }

    .tbs-steps { gap: 0; }
    .tbs-step-line { max-width: 30px; }
}

/* ===== GOOGLE AUTOCOMPLETE ===== */
.pac-container {
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid var(--tbs-border);
    font-family: inherit;
}

.pac-item {
    padding: 10px 16px;
    font-size: 14px;
}

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