/* ================================
   TAXI VIXA – kalkulátor ceny jízdy
   ================================ */

.fare-calc-trigger {
  background: #0b2240;
  color: #fff;
  border: 2px solid #ffcc00;
}

.fare-calc-trigger:hover {
  background: #132f55;
}

.fare-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(2, 8, 23, 0.72);
  padding: 18px;
  overflow-y: auto;
}

.fare-modal.is-open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.fare-dialog {
  position: relative;
  width: min(720px, 100%);
  margin: 4vh auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  overflow: visible;
}

.fare-dialog-header {
  background: #0b2240;
  color: #fff;
  padding: 24px 56px 20px 24px;
  border-radius: 16px 16px 0 0;
}

.fare-dialog-header h2 {
  margin: 0 0 6px;
  font-size: 1.65rem;
}

.fare-dialog-header p {
  margin: 0;
  color: #d7e2ef;
}

.fare-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.fare-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.fare-dialog-body {
  padding: 24px;
}

.fare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.fare-field-full {
  grid-column: 1 / -1;
}

.fare-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
  color: #162033;
}

.fare-autocomplete-host,
.fare-datetime {
  width: 100%;
}

.fare-autocomplete-host {
  min-height: 48px;
}

.fare-autocomplete-host > * {
  display: block;
  width: 100%;
}

.fare-autocomplete-host gmp-place-autocomplete {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #fff;
  color-scheme: light;
  color: #101828;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
}

.fare-datetime {
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  font: inherit;
  color: #101828;
  background: #fff;
}

.fare-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.fare-primary,
.fare-secondary {
  border: 0;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fare-primary {
  background: #ffcc00;
  color: #111;
}

.fare-primary:hover {
  filter: brightness(0.95);
}

.fare-primary:disabled {
  cursor: wait;
  opacity: 0.7;
}

.fare-secondary {
  background: #eef2f7;
  color: #0b2240;
}

.fare-message {
  display: none;
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 10px;
  line-height: 1.45;
}

.fare-message.is-visible {
  display: block;
}

.fare-message.is-error {
  background: #fff1f0;
  color: #8a1f17;
  border: 1px solid #ffc9c5;
}

.fare-message.is-info {
  background: #eef6ff;
  color: #164c7e;
  border: 1px solid #cfe4ff;
}

.fare-result {
  display: none;
  margin-top: 22px;
  border: 1px solid #dce3ec;
  border-radius: 14px;
  overflow: hidden;
}

.fare-result.is-visible {
  display: block;
}

.fare-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #f7f9fc;
  padding: 16px 18px;
  border-bottom: 1px solid #dce3ec;
}

.fare-result-head h3 {
  margin: 0;
}

.fare-price {
  color: #0b2240;
  font-size: 1.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.fare-result-body {
  padding: 18px;
}

.fare-result-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed #e2e7ee;
}

.fare-result-row:last-child {
  border-bottom: 0;
}

.fare-result-row strong {
  color: #344054;
}

.fare-formula {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0b2240;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.fare-note {
  margin: 14px 0 0;
  color: #667085;
  font-size: 0.92rem;
}

.fare-order-wrap {
  margin-top: 16px;
}



.fare-booking-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 145px;
  align-items: end;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e2e7ee;
}

.fare-booking-field {
  min-width: 0;
}

.fare-booking-passengers .fare-label {
  white-space: nowrap;
}

.fare-booking-passengers .fare-booking-select {
  width: 92px;
}

.fare-booking-input,
.fare-booking-select {
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #fff;
  color: #101828;
  font: inherit;
}

.fare-booking-input:focus,
.fare-booking-select:focus {
  outline: 2px solid #1f73ff;
  outline-offset: 1px;
  border-color: #1f73ff;
}

.fare-order-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.fare-order-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fare-order-actions .fare-primary,
.fare-order-actions .fare-secondary {
  width: auto;
}

.fare-binding-notice {
  max-width: 62ch;
  margin: 0;
  color: #667085;
  font-size: .84rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .fare-modal {
    padding: 8px;
  }

  .fare-dialog {
    margin: 10px auto;
    border-radius: 12px;
  }

  .fare-dialog-header {
    padding: 20px 48px 17px 18px;
    border-radius: 12px 12px 0 0;
  }

  .fare-dialog-body {
    padding: 18px;
  }

  .fare-grid {
    grid-template-columns: 1fr;
  }

  .fare-field-full {
    grid-column: auto;
  }

  .fare-result-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .fare-result-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .fare-actions,
  .fare-primary,
  .fare-secondary {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .fare-booking-details {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .fare-booking-passengers .fare-booking-select {
    width: 92px;
  }

  .fare-order-wrap {
    align-items: stretch;
  }

  .fare-order-actions {
    flex-wrap: nowrap;
  }

  .fare-order-actions .fare-primary,
  .fare-order-actions .fare-secondary {
    width: auto;
  }
}
