/* ============================================================================
   DESIGN TOKENS — Renkler, spacing, shadows, radii, transitions
   ============================================================================ */
:root {
    /* Brand */
    --c-primary:        #0d4f8a;
    --c-primary-600:    #0a3f70;
    --c-primary-700:    #082f55;
    --c-primary-50:     #eaf3fb;
    --c-primary-100:    #d5e7f6;
    --c-accent:         #06b6d4;

    /* Neutrals */
    --c-text:           #0f172a;
    --c-text-muted:     #475569;
    --c-text-soft:      #64748b;
    --c-border:         #e5e9f0;
    --c-border-soft:    #eef0f5;
    --c-surface:        #ffffff;
    --c-bg:             #f4f7fb;
    --c-bg-soft:        #f9fafc;

    /* Semantic */
    --c-success:        #16a34a;
    --c-success-50:     #ecfdf5;
    --c-success-200:    #a7f3d0;
    --c-warning:        #ea580c;
    --c-warning-50:     #fff7ed;
    --c-warning-200:    #fdba74;
    --c-danger:         #dc2626;
    --c-danger-50:      #fef2f2;
    --c-danger-200:     #fecaca;

    /* Spacing scale (4px base) */
    --sp-1:  4px;
    --sp-2:  8px;
    --sp-3:  12px;
    --sp-4:  16px;
    --sp-5:  20px;
    --sp-6:  24px;
    --sp-8:  32px;
    --sp-10: 40px;

    /* Radii */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-pill: 999px;

    /* Shadows */
    --sh-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --sh-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --sh-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --sh-lg: 0 12px 28px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.05);
    --sh-focus: 0 0 0 3px rgba(13, 79, 138, 0.18);

    /* Transitions */
    --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-base: 180ms cubic-bezier(0.4, 0, 0.2, 1);
    --t-slow: 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* izdeniz: tum global reset'leri .ferry-embed'e scope ettik (inline gomulu kullanim icin) */
.ferry-embed, .ferry-embed *, .ferry-embed *::before, .ferry-embed *::after {
    box-sizing: border-box;
}

.ferry-embed {
    /* eski body stilleri buraya tasindi */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 14px;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.5;

    /* eski .ferry-embed stilleri */
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
    position: relative;
    border-radius: 18px;
}

img, table {
    max-width: 100%;
}

.hidden {
    display: none !important;
}

.mandatory-hidden {
    display: none !important;
}

.error-banner {
    background: #fde4e4;
    color: #8a1f1f;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #f3b9b9;
}

.date-shift-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-left: 4px solid #ea580c;
    color: #9a3412;
    padding: 10px 14px;
    border-radius: 6px;
    margin: -2px 0 12px 0;
    font-size: 13px;
    line-height: 1.45;
}

.date-shift-banner .date-shift-icon {
    font-size: 16px;
    line-height: 1.2;
    flex-shrink: 0;
}

.date-shift-banner .date-shift-text {
    font-weight: 500;
}

.step {
    display: none;
    background: #fff;
    border: 1px solid #e3e6ee;
    border-radius: 8px;
    padding: 20px;
}

.step.active {
    display: block;
}

.step-title {
    margin: 0 0 18px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1769aa;
}

.btn-back {
    background: none;
    border: none;
    color: #1769aa;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
    font-size: 13px;
}

.btn-back:hover {
    text-decoration: underline;
}

/* FORM */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.field {
    flex: 1 1 180px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.field label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.field input,
.field select {
    padding: 8px 10px;
    border: 1px solid #ccd1da;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: #1769aa;
    box-shadow: 0 0 0 2px rgba(23,105,170,0.15);
}

/* Tarih input: sağda takvim ikonu */
.field input.fp-date {
    padding-right: 36px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231769aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
    cursor: pointer;
}

/* PAX COUNTER (stepper) */
.pax-counter-row {
    gap: 10px;
}

.pax-counter {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #d8dde6;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pax-counter:hover {
    border-color: #b9c8da;
}

.pax-counter:focus-within {
    border-color: #1769aa;
    box-shadow: 0 0 0 2px rgba(23, 105, 170, 0.15);
}

.pax-counter-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pax-counter-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    color: #0d4f8a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}
.pax-counter-icon svg {
    width: 22px;
    height: 22px;
}

.pax-counter-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pax-counter-title {
    font-size: 13px;
    font-weight: 600;
    color: #2a3340;
    line-height: 1.2;
}

.pax-counter-hint {
    font-size: 11px;
    color: #7a8595;
    line-height: 1.2;
    margin-top: 2px;
}

.pax-counter-stepper {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.pax-counter-stepper input[type=number] {
    width: 38px;
    text-align: center;
    padding: 6px 0;
    border: 1px solid transparent;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    -moz-appearance: textfield;
    appearance: textfield;
}

.pax-counter-stepper input[type=number]::-webkit-outer-spin-button,
.pax-counter-stepper input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pax-counter-stepper input[type=number]:focus {
    outline: none;
}

.pax-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #cbd5e0;
    background: #f5f7fa;
    color: #1769aa;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.pax-step:hover:not(:disabled) {
    background: #1769aa;
    border-color: #1769aa;
    color: #fff;
}

.pax-step:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ages-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.ages-container .age-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: auto;
}

.ages-container .age-item label {
    font-size: 12px;
    font-weight: 600;
    color: #2a3340;
    margin-bottom: 4px;
    letter-spacing: 0.1px;
}

.dt-group-row {
    display: inline-flex;
    gap: 6px;
}

.dt-group-row select {
    width: auto;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid #ccd1da;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #2a3340;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dt-group-row select:focus {
    outline: none;
    border-color: #1769aa;
    box-shadow: 0 0 0 2px rgba(23, 105, 170, 0.15);
}

.dt-group-row select[name=day],
.dt-group-row select[name=month] {
    width: 72px;
}

.dt-group-row select[name=year] {
    width: 92px;
}

.btn-primary {
    background: #1769aa;
    color: #fff;
    border: 0;
    padding: 11px 22px;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    margin-top: 8px;
}

.btn-primary:hover {
    background: #135a92;
}

.btn-primary:disabled {
    background: #9bb5cd;
    cursor: not-allowed;
}

/* RESULTS */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}

.trip-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px 0 10px 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
}

.route-title {
    font-size: 15px;
    margin: 0;
    color: #444;
}

.date-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.date-nav-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #cbd5e0;
    background: #f5f7fa;
    color: #1769aa;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.date-nav-btn:hover:not(:disabled) {
    background: #1769aa;
    border-color: #1769aa;
    color: #fff;
}

.date-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.date-nav-current {
    min-width: 100px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    padding: 0 8px;
}

.trip-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* SEFER SONUÇLARI LAYOUT — desktop: gidiş solda + dönüş sağda; mobile: gidiş üstte alt alta */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 16px;
}
.results-grid > #departure-results { grid-column: 1; }
.results-grid > #return-results { grid-column: 2; }
/* Dönüş gizliyse (oneway) gidiş tam genişlik */
.results-grid > #return-results.hidden { display: none; }
.results-grid:has(> #return-results.hidden) > #departure-results { grid-column: 1 / -1; }

/* Mobile: gidiş ÜSTTE, dönüş ALTTA — alt alta listeleme */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .results-grid > #departure-results,
    .results-grid > #return-results { grid-column: 1; }
}

/* Çapraz firma dim — selectedDeparture'ın firmasından farklı return'ler (ve tersi) bulanık */
.trip-card.cross-company-dim {
    opacity: 0.35;
    filter: grayscale(0.6);
    transition: opacity 0.2s, filter 0.2s;
}
.trip-card.cross-company-dim:hover {
    opacity: 0.7;
    filter: grayscale(0.2);
}

.trip-card {
    border: 1px solid #e3e6ee;
    border-radius: 6px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 0;
}

.trip-meta,
.trip-time {
    overflow-wrap: anywhere;
}

.trip-card:hover {
    border-color: #b9c8da;
}

.trip-card.selected {
    border-color: #1769aa;
    box-shadow: 0 0 0 2px rgba(23, 105, 170, 0.15);
    background: #f5fafe;
}

.trip-card.unavailable {
    opacity: 0.55;
    cursor: not-allowed;
}

.trip-thumb {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #eef2f6;
}

.trip-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.trip-time {
    font-size: 16px;
    font-weight: 600;
    color: #1769aa;
}

.trip-date-badge {
    display: inline-block;
    background: #1769aa;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 6px;
}

.trip-meta {
    font-size: 12px;
    color: #666;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    line-height: 1.4;
}

.trip-company-logo {
    height: 22px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 3px;
    background: #fff;
    padding: 2px 4px;
    border: 1px solid #eef0f4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    flex-shrink: 0;
}

.trip-company-name {
    font-weight: 600;
    color: #2a3340;
}

.trip-meta-sep {
    color: #ccd1da;
    margin: 0 2px;
}

.trip-quota {
    font-size: 11px;
    color: #888;
}

.trip-quota-row {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.trip-quota-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    background: #eef5fb;
    color: #1769aa;
    border: 1px solid #d6e7f3;
}

.trip-quota-chip.trip-quota-low {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.trip-quota-chip.trip-quota-bad {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.trip-price {
    font-size: 18px;
    font-weight: 700;
    color: #2a7d2a;
    white-space: nowrap;
}

.trip-select {
    padding: 8px 14px;
    background: #1769aa;
    color: #fff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.trip-select:hover {
    background: #135a92;
}

.trip-select:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.trip-select.selected {
    background: #2a7d2a;
}

.continue-bar {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid #eef0f4;
}

/* PRICE SUMMARY */
.price-summary {
    background: #f5fafe;
    border: 1px solid #d6e7f3;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 22px;
}

.price-summary .step-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
}

.price-table td {
    padding: 6px 0;
    font-size: 13px;
}

.price-table tbody td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.price-table .price-row-meta {
    color: #777;
    font-size: 11px;
    padding-top: 0;
    padding-bottom: 8px;
}

.price-table .price-total {
    border-top: 1px solid #c8d8e6;
    font-size: 15px;
    font-weight: 700;
    color: #1769aa;
}

.price-table .price-total td {
    padding-top: 10px;
}

.price-table .price-total td:last-child {
    text-align: right;
}

/* PASSENGERS */
.passenger-card {
    border: 1px solid #e3e6ee;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 14px;
    background: #fff;
}

.passenger-card .passenger-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.passenger-card .pax-type {
    background: #1769aa;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.passenger-card .pax-type.child {
    background: #d97706;
}

.passenger-card .pax-type.infant {
    background: #16a34a;
}

/* RADIO GROUP */
.radio-group {
    display: flex;
    gap: 16px;
    padding-top: 4px;
}

.radio-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}

.radio-item input[type=radio] {
    margin: 0;
}

/* CONTRACTS */
.contracts-container {
    margin: 18px 0 8px;
}

.contract-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.contract-row input[type=checkbox] {
    margin-top: 3px;
    flex-shrink: 0;
}

.contract-link {
    color: #1769aa;
    cursor: pointer;
    text-decoration: underline;
}

.contract-link:hover {
    color: #135a92;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-box {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 14px 20px;
    border-bottom: 1px solid #e3e6ee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #1769aa;
}

.modal-close {
    background: none;
    border: 0;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
}

.modal-close:hover {
    color: #444;
}

.modal-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex: 1;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

.modal-body p {
    margin: 0 0 10px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #e3e6ee;
    text-align: right;
}

/* PAYMENT */
.payment-card {
    border: 1px solid #e3e6ee;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 14px;
    background: #fff;
}

/* Adım 2/3 üstünde inline yolcu sayısı düzenleyici */
.pax-quick-editor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    background: #f4f7fb;
    border: 1px solid #e3e6ee;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 8px 0 14px;
    font-size: 13px;
}
.pax-quick-label {
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    margin-right: 4px;
}
.pax-quick-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #d8dde8;
    border-radius: 999px;
    padding: 3px 6px 3px 12px;
}
.pax-quick-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0d4f8a;
    width: 18px;
    height: 18px;
}
.pax-quick-icon svg { width: 16px; height: 16px; }
.pax-quick-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #d8dde8;
    background: #fff;
    color: #0d4f8a;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s, border-color .15s;
}
.pax-quick-btn:hover { background: #0d4f8a; color: #fff; border-color: #0d4f8a; }
.pax-quick-count {
    min-width: 16px;
    text-align: center;
    font-weight: 700;
    color: #0f172a;
}

/* Çocuk/Bebek doğum tarihi — 3 parça select */
.bd-3parts {
    display: inline-flex;
    gap: 6px;
    width: 100%;
}
.bd-3parts select {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}
.bd-3parts .bd-day,
.bd-3parts .bd-month { max-width: 80px; }
.bd-3parts .bd-year { flex: 1.4 1 0; }
/* Çocuk/Bebek kartında doğum tarihi + uyruk aynı satırda */
.row.child-bd-row { align-items: flex-end; }
.row.child-bd-row .field { flex: 1 1 0; min-width: 0; }

/* Passenger card × silme butonu */
.passenger-card { position: relative; }
.passenger-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #fecaca;
    background: #fff;
    color: #b91c1c;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.passenger-remove:hover {
    background: #b91c1c;
    color: #fff;
    border-color: #b91c1c;
    transform: scale(1.05);
}

/* Ödeme alanı altı: Visa/Mastercard/Troy + SSL trust bar */
.payment-trust-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 10px 14px;
    margin: 4px 0 10px;
    border: 1px solid #e3e6ee;
    border-radius: 6px;
    background: #fff;
}
.payment-trust-cards {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.card-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 4px 8px;
    border: 1px solid #e3e6ee;
    border-radius: 4px;
    background: #fff;
    line-height: 0;
}
.card-logo svg { height: 18px; width: auto; display: block; }
.payment-trust-secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    font-weight: 600;
}
.payment-trust-secure svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Bilet Al üstünde büyük toplam tutar barı — kullanıcı ne ödediğini ödeme alanında da görmeli */
.payment-total-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    margin: 8px 0 14px;
    background: linear-gradient(135deg, #0a3f70, #0d4f8a);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(13, 79, 138, 0.18);
}
.payment-total-bar-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    opacity: 0.85;
}
.payment-total-bar-amount {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-align: right;
}
.payment-total-bar-tl {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.78;
    margin-top: 2px;
    letter-spacing: 0;
}
/* Fiyat özeti satırlarında TL karşılığı (≈ X ₺) */
.price-row-unit {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    margin-top: 2px;
    line-height: 1.2;
}
.price-row-tl {
    display: inline-block;
    margin-left: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.threeds-iframe {
    width: 100%;
    min-height: 600px;
    border: 1px solid #e3e6ee;
    border-radius: 6px;
}

.threeds-loading {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

/* RESULT */
.result-box {
    text-align: center;
    padding: 40px 30px;
    border-radius: 8px;
}

.result-box.result-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.result-box.result-fail {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #7f1d1d;
}

.result-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
    font-weight: bold;
}

.result-box h2 {
    margin: 0 0 12px 0;
}

.result-body {
    color: #333;
}

.voucher-details {
    background: #fff;
    border-radius: 6px;
    padding: 14px 18px;
    margin: 16px auto 0;
    max-width: 500px;
    text-align: left;
    font-size: 13px;
    line-height: 1.7;
}

.voucher-details .label {
    color: #666;
    margin-right: 6px;
}

.empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

@media (max-width: 760px) {
    .ferry-embed {
        padding: 12px 10px 64px;
    }

    .step {
        padding: 14px 12px;
    }

    .field {
        flex: 1 1 100%;
    }

    .pax-counter {
        flex: 1 1 100%;
    }

    .trip-card {
        flex-wrap: wrap;
    }

    .trip-thumb {
        width: 100%;
        height: 110px;
    }

    .trip-info {
        flex: 1 1 100%;
    }

    .trip-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .date-nav {
        align-self: stretch;
        justify-content: space-between;
    }

    .step-title {
        font-size: 17px;
    }

    .price-summary {
        padding: 10px 12px;
    }

    .modal-box {
        max-height: 92vh;
    }

    .lang-switcher {
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        margin: 8px 0 12px;
        padding: 6px;
        background: rgba(13, 79, 138, 0.04);
        border-radius: 8px;
        width: 100%;
    }
    .lang-switcher .lang-flag {
        padding: 5px 10px;
        font-size: 11px;
        flex: 0 0 auto;
    }
    .powered-by {
        position: static;
        display: inline-flex;
        margin: 6px;
    }
    /* Agency header (varsa) lang-switcher ile üst üste binmesin */
    .agency-header {
        margin-top: 0;
        clear: both;
    }
}

@media (max-width: 420px) {
    .ferry-embed {
        padding: 8px 6px 60px;
    }

    .step {
        padding: 12px 10px;
    }

    .pax-counter {
        padding: 8px 10px;
    }

    .pax-counter-stepper input[type=number] {
        width: 32px;
    }
}

/* LANG SWITCHER — fixed position + maksimum z-index ile agency header'ın üstünde kalır */
.lang-switcher {
    position: fixed;
    top: 8px;
    right: 12px;
    z-index: 2147483647; /* max int — acentenin custom CSS'ı (z-index: 99999) bile aşamaz */
    display: flex;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}

/* Agency header varsa hover dropdown'larının form alanı tarafından örtülmesini engelle.
   Genelde nav > li > ul tipi yapılar — yüksek z-index güvencesi. */
.agency-header { position: relative; z-index: 50; }
.agency-header ul ul,
.agency-header [class*="sub"],
.agency-header [class*="dropdown"],
.agency-header [class*="menu"] [class*="sub"] {
    z-index: 2147483646 !important;
}

.lang-flag {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    color: #6b7280;
    letter-spacing: 0.4px;
    opacity: 0.7;
    transition: opacity 0.15s, border-color 0.15s, color 0.15s, background 0.15s;
}

.lang-flag:hover {
    opacity: 1;
    color: #2a3340;
}

.lang-flag.active {
    opacity: 1;
    border-color: #1769aa;
    color: #1769aa;
    background: rgba(23, 105, 170, 0.08);
}

/* POWERED BY */
.powered-by {
    position: absolute;
    bottom: 26px;
    left: 32px;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.75;
    transition: opacity 0.2s ease;
    padding: 6px 8px;
    border-radius: 4px;
    text-decoration: none;
    background: #fff;
}

.powered-by:hover {
    opacity: 1;
}

.powered-by-text {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.2px;
    line-height: 1;
}

.powered-by img {
    height: 22px;
    display: block;
}

/* ============================================================================
   PROFESSIONAL UI POLISH — Refined cards, typography, motion, focus, hierarchy
   ============================================================================ */

/* Inter font for crisp typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Step container — soft elevation, modern spacing */
.step {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: var(--sp-6);
    box-shadow: var(--sh-sm);
}

.step.active {
    animation: stepFade 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.step-title {
    margin: 0 0 var(--sp-5) 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.01em;
}

.btn-back {
    color: var(--c-primary);
    font-weight: 500;
    font-size: 13px;
    padding: 4px 0;
    margin-bottom: var(--sp-3);
    transition: opacity var(--t-fast);
}
.btn-back:hover { opacity: 0.7; text-decoration: none; }

/* Form fields — polished inputs */
.field label {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-muted);
    letter-spacing: 0.02em;
    margin-bottom: var(--sp-2);
}

.field input,
.field select {
    padding: 10px 12px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    font-size: 14px;
    background-color: var(--c-surface);
    color: var(--c-text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}

.field input:hover,
.field select:hover {
    border-color: #cdd5e2;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: var(--sh-focus);
    background-color: var(--c-surface);
}

.field input.fp-date {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230d4f8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2' ry='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
}

/* Buttons — primary CTA with subtle elevation + hover lift */
.btn-primary {
    background: linear-gradient(180deg, var(--c-primary) 0%, var(--c-primary-600) 100%);
    color: #fff;
    border: 0;
    padding: 12px 22px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    margin-top: 0;
    box-shadow: var(--sh-sm);
    transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(180deg, var(--c-primary-600) 0%, var(--c-primary-700) 100%);
    box-shadow: var(--sh-md);
    transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--sh-xs);
}
.btn-primary:disabled {
    background: #cbd5e0;
    color: #f1f5f9;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Pax counter — refined card */
.pax-counter {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 12px 16px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.pax-counter:hover { border-color: #cdd5e2; box-shadow: var(--sh-xs); }
.pax-counter:focus-within {
    border-color: var(--c-primary);
    box-shadow: var(--sh-focus);
}
.pax-counter-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-text);
}
.pax-counter-hint {
    font-size: 11px;
    color: var(--c-text-soft);
    margin-top: 2px;
}
.pax-step {
    width: 32px;
    height: 32px;
    border: 1px solid var(--c-border);
    background: var(--c-bg-soft);
    color: var(--c-primary);
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.pax-step:hover:not(:disabled) {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
    transform: scale(1.05);
}
.pax-step:active:not(:disabled) { transform: scale(0.95); }

/* Trip section header — typography hierarchy */
.trip-section-header {
    border-bottom: 1px solid var(--c-border-soft);
    padding-bottom: var(--sp-3);
    margin: var(--sp-5) 0 var(--sp-3);
}
.route-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.01em;
}

/* Date nav — refined pill buttons */
.date-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--c-border);
    background: var(--c-bg-soft);
    color: var(--c-primary);
    transition: all var(--t-fast);
}
.date-nav-btn:hover:not(:disabled) {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
    transform: scale(1.05);
}
.date-nav-current {
    color: var(--c-text);
    font-weight: 700;
    font-size: 13px;
}

/* Trip list — generous spacing */
.trip-list { gap: var(--sp-3); }

/* Trip card — refined hover, selected, hierarchy */
.trip-card {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-4);
    background: var(--c-surface);
    box-shadow: var(--sh-xs);
    transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-fast), background var(--t-base);
    position: relative;
    overflow: hidden;
}
.trip-card:hover:not(.unavailable):not(.selected) {
    border-color: #b5c4d6;
    box-shadow: var(--sh-sm);
    transform: translateY(-1px);
}
.trip-card.selected {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 2px var(--c-primary-100), var(--sh-sm);
    background: linear-gradient(180deg, #ffffff 0%, var(--c-primary-50) 100%);
}
.trip-card.selected::before {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--c-primary);
    color: #fff;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--sh-sm);
}

.trip-thumb {
    width: 88px;
    height: 60px;
    border-radius: var(--r-sm);
    background: var(--c-bg-soft);
    box-shadow: var(--sh-xs);
}

.trip-time {
    font-size: 17px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -0.01em;
}

.trip-meta {
    font-size: 12px;
    color: var(--c-text-soft);
    margin-top: 2px;
}

.trip-company-logo {
    height: 24px;
    max-width: 90px;
    border: 1px solid var(--c-border-soft);
    background: #fff;
    box-shadow: var(--sh-xs);
}

.trip-company-name {
    font-weight: 600;
    color: var(--c-text);
    font-size: 13px;
}

.trip-meta-sep { color: #d4dae3; }

.trip-quota-chip {
    background: var(--c-primary-50);
    color: var(--c-primary);
    border-color: var(--c-primary-100);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
}

.trip-select {
    padding: 9px 18px;
    background: linear-gradient(180deg, var(--c-primary) 0%, var(--c-primary-600) 100%);
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--sh-sm);
    transition: all var(--t-fast);
}
.trip-select:hover:not(:disabled) {
    background: linear-gradient(180deg, var(--c-primary-600) 0%, var(--c-primary-700) 100%);
    box-shadow: var(--sh-md);
    transform: translateY(-1px);
}
.trip-select.selected {
    background: linear-gradient(180deg, var(--c-success) 0%, #15803d 100%);
}
.trip-select:disabled {
    background: #cbd5e0;
    box-shadow: none;
    transform: none;
}

/* Continue bar — clean separator */
.continue-bar {
    margin-top: var(--sp-6);
    padding-top: var(--sp-4);
    border-top: 1px solid var(--c-border-soft);
}

/* Price summary — refined card with sticky-feel */
.price-summary {
    background: linear-gradient(180deg, var(--c-primary-50) 0%, #fbfdff 100%);
    border: 1px solid var(--c-primary-100);
    border-radius: var(--r-md);
    padding: var(--sp-5) var(--sp-5);
    box-shadow: var(--sh-xs);
}
.price-summary .step-title {
    font-size: 14px;
    margin-bottom: var(--sp-3);
    color: var(--c-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
.price-table td {
    padding: 8px 0;
    font-size: 13px;
}
.price-table .price-total {
    border-top: 1.5px solid var(--c-primary-100);
    font-size: 17px;
    font-weight: 700;
    color: var(--c-primary);
}
.price-table .price-total td { padding-top: 14px; }

/* Passenger card — cleaner */
.passenger-card {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--sp-5);
    margin-bottom: var(--sp-3);
    background: var(--c-surface);
    box-shadow: var(--sh-xs);
}
.passenger-card .passenger-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: var(--sp-4);
}
.passenger-card .pax-type {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: var(--r-pill);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--c-primary);
}
.passenger-card .pax-type.child { background: var(--c-warning); }
.passenger-card .pax-type.infant { background: var(--c-success); }

/* Banners — refined */
.error-banner {
    background: var(--c-danger-50);
    color: var(--c-danger);
    border: 1px solid var(--c-danger-200);
    border-left: 4px solid var(--c-danger);
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-weight: 500;
    font-size: 13px;
    box-shadow: var(--sh-xs);
}
.date-shift-banner {
    border-radius: var(--r-sm);
    box-shadow: var(--sh-xs);
}

/* Lang switcher — refined chip */
.lang-flag {
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--c-text-soft);
    transition: all var(--t-fast);
}
.lang-flag:hover { color: var(--c-text); }
.lang-flag.active {
    border-color: var(--c-primary);
    background: var(--c-primary-50);
    color: var(--c-primary);
}

/* Powered-by — subtle footer */
.powered-by {
    bottom: 24px;
    left: 30px;
    background: var(--c-surface);
    border: 1px solid var(--c-border-soft);
    box-shadow: var(--sh-xs);
}
.powered-by-text {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--c-text-soft);
}

/* Loading state — subtle pulse */
.loading {
    color: var(--c-text-soft);
    padding: var(--sp-10) var(--sp-5);
    font-size: 13px;
}
.loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--c-primary-100);
    border-top-color: var(--c-primary);
    border-radius: 50%;
    margin-left: 10px;
    vertical-align: middle;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal — cleaner shadow */
.modal-box {
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    border: 1px solid var(--c-border);
}

/* Selection highlight */
::selection {
    background: var(--c-primary-100);
    color: var(--c-primary-700);
}

/* Mobile fine-tunes */
@media (max-width: 640px) {
    .step { padding: var(--sp-4); border-radius: var(--r-md); }
    .step-title { font-size: 17px; }
    .trip-card { padding: var(--sp-3); }
    .trip-time { font-size: 16px; }
    .trip-thumb { width: 64px; height: 48px; }
    .pax-counter { padding: var(--sp-3); }
    .price-summary { padding: var(--sp-4); }
}

/* Agency branding (sadece standalone açılışta render edilir) */
.agency-header,
.agency-footer {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: var(--sp-4) var(--sp-5);
    margin-bottom: var(--sp-3);
    box-shadow: var(--sh-xs);
    overflow: hidden;
    word-wrap: break-word;
}
.agency-footer {
    margin-bottom: 0;
    margin-top: var(--sp-4);
}
.agency-header img,
.agency-footer img { max-width: 100%; height: auto; }
.agency-header :first-child,
.agency-footer :first-child { margin-top: 0; }
.agency-header :last-child,
.agency-footer :last-child { margin-bottom: 0; }

/* ============================================================================
   LAYOUT TEMALARI — ?theme=square|mini|wide|inline ile aktif olur
   embed.js body class'ını set eder.

   Tasarım hedefleri (hepsinde):
   - Tüm form alanları (kalkış / varış / sefer tipi / gidiş / dönüş / pax / araç /
     Sefer Ara) görünür ve kompakt.
   - Iframe yüksekliği: tam sığsın, scroll ZORUNLU olmasın, üst/alt boşluk
     minimum. Validation error banner yüksekliği hesaba katılır.
   - Aşırı estetik + kurumsal: pill-style fields, brand gradient CTA, hairline
     border, monoton corporate palette.
   ============================================================================ */

/* Ortak — tüm tema'lar için form layout (display: contents satır flatten) */
body.theme-square #step-search > form,
body.theme-mini #step-search > form,
body.theme-wide #step-search > form,
body.theme-inline #step-search > form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    align-items: flex-end;
    margin: 0;
}
body.theme-square #step-search > form > .row,
body.theme-mini #step-search > form > .row,
body.theme-wide #step-search > form > .row,
body.theme-inline #step-search > form > .row {
    display: contents;
}

/* Ortak — gizlenecekler */
body.theme-square #step-search .step-title,
body.theme-mini #step-search .step-title,
body.theme-wide #step-search .step-title,
body.theme-inline #step-search .step-title { display: none; }

body.theme-square .powered-by,
body.theme-mini .powered-by,
body.theme-wide .powered-by,
body.theme-inline .powered-by { display: none; }

body.theme-square #step-search .ages-container,
body.theme-mini #step-search .ages-container,
body.theme-wide #step-search .ages-container,
body.theme-inline #step-search .ages-container { display: none; }

/* vehicleType (araç tipi) compact mod'larda gizli — kullanıcı sonraki adımda
   araç seçtikten sonra default tip ile devam eder; gerek yoksa step 2'de set */
body.theme-square #step-search #vehicleTypeField,
body.theme-mini #step-search #vehicleTypeField,
body.theme-wide #step-search #vehicleTypeField,
body.theme-inline #step-search #vehicleTypeField { display: none; }

/* Ortak — error banner kompakt (form yüksekliğini taşmamak için) */
body.theme-square .error-banner,
body.theme-mini .error-banner,
body.theme-wide .error-banner,
body.theme-inline .error-banner {
    padding: 5px 9px;
    font-size: 11.5px;
    margin-bottom: 6px;
    border-radius: 6px;
    line-height: 1.35;
}

/* Ortak — lang switcher kompakt temalarda GİZLİ (form'la çakışıyordu).
   Lang parent sayfadan iframe URL'i ile geliyor; widget içinde değişime gerek yok. */
body.theme-square .lang-switcher,
body.theme-mini .lang-switcher,
body.theme-wide .lang-switcher,
body.theme-inline .lang-switcher { display: none !important; }

/* Ortak — fields (compact pill-style) */
body.theme-square #step-search .field,
body.theme-mini #step-search .field,
body.theme-wide #step-search .field,
body.theme-inline #step-search .field {
    margin: 0;
}
body.theme-square #step-search .field label,
body.theme-mini #step-search .field label,
body.theme-wide #step-search .field label,
body.theme-inline #step-search .field label {
    font-size: 9.5px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 2px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
body.theme-square #step-search .field input,
body.theme-square #step-search .field select,
body.theme-mini #step-search .field input,
body.theme-mini #step-search .field select,
body.theme-wide #step-search .field input,
body.theme-wide #step-search .field select,
body.theme-inline #step-search .field input,
body.theme-inline #step-search .field select {
    padding: 6px 9px;
    height: 32px;
    font-size: 12px;
    font-weight: 500;
    color: var(--c-text);
    border-radius: 7px;
    background: #f8fafc;
    border: 1px solid #e5e9f0;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
body.theme-square #step-search .field input:hover,
body.theme-square #step-search .field select:hover,
body.theme-mini #step-search .field input:hover,
body.theme-mini #step-search .field select:hover,
body.theme-wide #step-search .field input:hover,
body.theme-wide #step-search .field select:hover,
body.theme-inline #step-search .field input:hover,
body.theme-inline #step-search .field select:hover {
    background: #fff;
    border-color: #cbd5e1;
}
body.theme-square #step-search .field input:focus,
body.theme-square #step-search .field select:focus,
body.theme-mini #step-search .field input:focus,
body.theme-mini #step-search .field select:focus,
body.theme-wide #step-search .field input:focus,
body.theme-wide #step-search .field select:focus,
body.theme-inline #step-search .field input:focus,
body.theme-inline #step-search .field select:focus {
    background: #fff;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(13, 79, 138, 0.12);
}
body.theme-square #step-search .field input.fp-date,
body.theme-mini #step-search .field input.fp-date,
body.theme-wide #step-search .field input.fp-date,
body.theme-inline #step-search .field input.fp-date {
    padding-right: 26px;
    background-size: 12px 12px;
    background-position: right 8px center;
}

/* Ortak — pax counters (kompakt pill, label gizli, sadece icon + stepper) */
body.theme-square #step-search .pax-counter-row,
body.theme-mini #step-search .pax-counter-row,
body.theme-wide #step-search .pax-counter-row,
body.theme-inline #step-search .pax-counter-row {
    gap: 0;
    margin: 0;
}
body.theme-square #step-search .pax-counter,
body.theme-mini #step-search .pax-counter,
body.theme-wide #step-search .pax-counter,
body.theme-inline #step-search .pax-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px;
    background: #f8fafc;
    border-radius: 7px;
    border: 1px solid #e5e9f0;
    height: 32px;
    align-self: flex-end;
    margin-bottom: 0;
    transition: border-color 0.15s, background 0.15s;
}
body.theme-square #step-search .pax-counter:hover,
body.theme-mini #step-search .pax-counter:hover,
body.theme-wide #step-search .pax-counter:hover,
body.theme-inline #step-search .pax-counter:hover {
    background: #fff;
    border-color: #cbd5e1;
}
body.theme-square #step-search .pax-counter-info,
body.theme-mini #step-search .pax-counter-info,
body.theme-wide #step-search .pax-counter-info,
body.theme-inline #step-search .pax-counter-info {
    gap: 4px;
    flex: 0 0 auto;
}
body.theme-square #step-search .pax-counter-icon,
body.theme-mini #step-search .pax-counter-icon,
body.theme-wide #step-search .pax-counter-icon,
body.theme-inline #step-search .pax-counter-icon {
    width: 20px; height: 20px;
    background: rgba(13, 79, 138, 0.08);
    color: var(--c-primary);
    border-radius: 4px;
    box-shadow: none;
}
body.theme-square #step-search .pax-counter-icon svg,
body.theme-mini #step-search .pax-counter-icon svg,
body.theme-wide #step-search .pax-counter-icon svg,
body.theme-inline #step-search .pax-counter-icon svg {
    width: 12px; height: 12px;
}
/* pax title + hint gizle (icon görseli yeterli, kompakt mod) */
body.theme-square #step-search .pax-counter-text,
body.theme-mini #step-search .pax-counter-text,
body.theme-wide #step-search .pax-counter-text,
body.theme-inline #step-search .pax-counter-text { display: none; }
body.theme-square #step-search .pax-counter-stepper,
body.theme-mini #step-search .pax-counter-stepper,
body.theme-wide #step-search .pax-counter-stepper,
body.theme-inline #step-search .pax-counter-stepper {
    gap: 0;
    margin-left: 0;
    height: 22px;
}
body.theme-square #step-search .pax-step,
body.theme-mini #step-search .pax-step,
body.theme-wide #step-search .pax-step,
body.theme-inline #step-search .pax-step {
    width: 20px; height: 20px;
    font-size: 12px;
    border-radius: 4px;
    background: transparent;
    color: var(--c-primary);
    border: 0;
}
body.theme-square #step-search .pax-step:hover,
body.theme-mini #step-search .pax-step:hover,
body.theme-wide #step-search .pax-step:hover,
body.theme-inline #step-search .pax-step:hover {
    background: rgba(13, 79, 138, 0.10);
}
body.theme-square #step-search .pax-counter-stepper input,
body.theme-mini #step-search .pax-counter-stepper input,
body.theme-wide #step-search .pax-counter-stepper input,
body.theme-inline #step-search .pax-counter-stepper input {
    width: 20px; height: 20px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--c-text);
    background: transparent;
    border: 0;
    padding: 0;
    text-align: center;
}

/* Ortak — Sefer Ara button (brand gradient + arrow) */
body.theme-square #step-search .continue-bar,
body.theme-mini #step-search .continue-bar,
body.theme-wide #step-search .continue-bar,
body.theme-inline #step-search .continue-bar {
    flex: 0 0 auto;
    padding: 0; margin: 0; border: 0;
    align-self: flex-end;
}
body.theme-square #step-search .btn-primary,
body.theme-mini #step-search .btn-primary,
body.theme-wide #step-search .btn-primary,
body.theme-inline #step-search .btn-primary {
    height: 32px;
    padding: 0 16px;
    font-size: 12.5px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--c-primary) 0%, #1a6db5 100%);
    color: #fff;
    border: 0;
    border-radius: 7px;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 10px rgba(13, 79, 138, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto;
}
body.theme-square #step-search .btn-primary::after,
body.theme-mini #step-search .btn-primary::after,
body.theme-wide #step-search .btn-primary::after,
body.theme-inline #step-search .btn-primary::after {
    content: '→';
    font-size: 13px;
    transition: transform 0.15s;
}
body.theme-square #step-search .btn-primary:hover,
body.theme-mini #step-search .btn-primary:hover,
body.theme-wide #step-search .btn-primary:hover,
body.theme-inline #step-search .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(13, 79, 138, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
body.theme-square #step-search .btn-primary:hover::after,
body.theme-mini #step-search .btn-primary:hover::after,
body.theme-wide #step-search .btn-primary:hover::after,
body.theme-inline #step-search .btn-primary:hover::after {
    transform: translateX(2px);
}

/* ============================================================================
   THEME: SQUARE — ~520 wide × ~310 tall (with error banner)
   3 satır: [kalkış+varış] [sefer tipi+gidiş+dönüş] [yetişkin+çocuk+araç+button]
   ============================================================================ */
body.theme-square .ferry-embed {
    max-width: 520px;
    padding: 8px 10px;
    margin: 0 auto;
}
/* Row 1: 2 ports — flex grow eşit */
body.theme-square #step-search .field:has(#departureRegion),
body.theme-square #step-search .field:has(#arrivalRegion) { flex: 1 1 calc(50% - 4px); min-width: 0; }
/* Row 2: route + 2 dates — eşit 3 sütun */
body.theme-square #step-search .field:has(#routeType),
body.theme-square #step-search .field:has(#serviceDate),
body.theme-square #step-search .field:has(#returnServiceDate) { flex: 1 1 calc(33.333% - 6px); min-width: 0; }
/* Row 3: pax x2 + araç + button (4 öğe) */
body.theme-square #step-search .pax-counter { flex: 0 0 auto; }
body.theme-square #step-search .field:has(#vehicleQuantity) { flex: 1 1 100px; min-width: 90px; }
body.theme-square #step-search .field:has(#vehicleQuantity) label { display: none; } /* row 3'te diğer öğeler label'sız, hizayı bozuyor */

/* ============================================================================
   THEME: MINI — ~380 wide × ~340 tall
   4 satır: [kalkış+varış] [sefer tipi+gidiş+dönüş] [yetişkin+çocuk] [araç+button]
   ============================================================================ */
body.theme-mini .ferry-embed {
    max-width: 380px;
    padding: 8px 10px;
    margin: 0 auto;
}
body.theme-mini #step-search .field:has(#departureRegion),
body.theme-mini #step-search .field:has(#arrivalRegion) { flex: 1 1 calc(50% - 4px); min-width: 0; }
body.theme-mini #step-search .field:has(#routeType),
body.theme-mini #step-search .field:has(#serviceDate),
body.theme-mini #step-search .field:has(#returnServiceDate) { flex: 1 1 calc(33.333% - 6px); min-width: 0; }
body.theme-mini #step-search .pax-counter { flex: 1 1 calc(50% - 4px); justify-content: space-between; }
body.theme-mini #step-search .field:has(#vehicleQuantity) { flex: 1 1 calc(60% - 4px); min-width: 0; }
body.theme-mini #step-search .field:has(#vehicleQuantity) label { display: none; }
body.theme-mini #step-search .continue-bar { flex: 0 0 auto; margin-left: auto; }

/* ============================================================================
   THEME: WIDE — ~880 wide × ~140 tall
   2 satır: [kalkış+varış+sefer tipi+gidiş+dönüş] [yetişkin+çocuk+araç+button]
   ============================================================================ */
body.theme-wide .ferry-embed {
    max-width: 880px;
    padding: 8px 12px;
    margin: 0 auto;
}
body.theme-wide #step-search .field:has(#departureRegion),
body.theme-wide #step-search .field:has(#arrivalRegion) { flex: 1 1 150px; min-width: 130px; }
body.theme-wide #step-search .field:has(#routeType) { flex: 0 1 130px; min-width: 110px; }
body.theme-wide #step-search .field:has(#serviceDate),
body.theme-wide #step-search .field:has(#returnServiceDate) { flex: 0 1 130px; min-width: 110px; }
body.theme-wide #step-search .pax-counter { flex: 0 0 auto; }
body.theme-wide #step-search .field:has(#vehicleQuantity) { flex: 0 1 130px; min-width: 110px; }
body.theme-wide #step-search .field:has(#vehicleQuantity) label { display: none; }
body.theme-wide #step-search .continue-bar { margin-left: auto; }

/* ============================================================================
   THEME: INLINE — ~1100 wide × ~90 tall (worst-case ~140 with error)
   1 satır: [kalkış+varış+sefer tipi+gidiş+dönüş+yetişkin+çocuk+araç+button]
   En agresif kompakt — corporate gradient bg + brand-color sol şerit
   ============================================================================ */
body.theme-inline {
    background: linear-gradient(180deg, #fafbfd 0%, #f0f4fa 100%);
}
body.theme-inline .ferry-embed {
    max-width: 100%;
    padding: 8px 12px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.04);
    margin: 4px 6px;
    border-left: 3px solid var(--c-primary);
}
body.theme-inline #step-search .field:has(#departureRegion),
body.theme-inline #step-search .field:has(#arrivalRegion) { flex: 1 1 130px; min-width: 110px; }
body.theme-inline #step-search .field:has(#routeType) { flex: 0 1 110px; min-width: 100px; }
body.theme-inline #step-search .field:has(#serviceDate),
body.theme-inline #step-search .field:has(#returnServiceDate) { flex: 0 1 120px; min-width: 105px; }
body.theme-inline #step-search .pax-counter { flex: 0 0 auto; }
body.theme-inline #step-search .field:has(#vehicleQuantity) { flex: 0 1 110px; min-width: 95px; }
body.theme-inline #step-search .field:has(#vehicleQuantity) label { display: none; }
body.theme-inline #step-search .continue-bar { margin-left: auto; }

/* Inline mobile fallback — wrap to 2-3 satır kalır, scroll yok */
@media (max-width: 720px) {
    body.theme-inline #step-search .field:has(#departureRegion),
    body.theme-inline #step-search .field:has(#arrivalRegion) { flex: 1 1 calc(50% - 4px); }
    body.theme-inline #step-search .field:has(#routeType) { flex: 1 1 calc(50% - 4px); }
    body.theme-inline #step-search .field:has(#serviceDate),
    body.theme-inline #step-search .field:has(#returnServiceDate) { flex: 1 1 calc(50% - 4px); }
    body.theme-inline #step-search .pax-counter,
    body.theme-inline #step-search .field:has(#vehicleQuantity) { flex: 1 1 calc(50% - 4px); }
    body.theme-inline #step-search .continue-bar { flex: 1 1 100%; }
    body.theme-inline #step-search .btn-primary { width: 100%; justify-content: center; }
}

/* ============================================================
   MOBILE LANG SWITCHER OVERRIDE — file sonunda, base rule'u eziyor.
   Sebep: base .lang-switcher (position:absolute) media query'den SONRA tanımlı,
   bu yüzden eski media query rule'ları override edemiyordu.
   ============================================================ */
@media (max-width: 760px) {
    .lang-switcher,
    body:not([class*="theme-"]) .lang-switcher {
        position: static !important;
        top: auto !important;
        right: auto !important;
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        margin: 8px auto 12px;
        padding: 6px;
        background: rgba(13, 79, 138, 0.04);
        border-radius: 8px;
        width: 100%;
        max-width: 320px;
        z-index: auto;
    }
    .lang-switcher .lang-flag {
        padding: 5px 10px;
        font-size: 11px;
        flex: 0 0 auto;
    }
    /* Agency header lang-switcher'la üst üste binmesin */
    .agency-header {
        margin-top: 0;
        clear: both;
    }
    /* Compact theme'lerde zaten gizli (display:none !important) — etkilenmez */
}

