/* ==========================================================================
   Taxi Booking — v2.2.0
   CSS profesional, limpio, encapsulado y sin !important
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;500;700&display=swap');

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  --tbm-accent: #f6c400;
  --tbm-accent-light: #ffd500;
  --tbm-accent-dark: #e5b000;

  --tbm-black: #000000;
  --tbm-white: #ffffff;

  --tbm-text: #111111;
  --tbm-text-soft: #444444;
  --tbm-text-muted: #888888;
  --tbm-placeholder: #bbbbbb;

  --tbm-border: #cccccc;
  --tbm-border-soft: #efefef;

  --tbm-error: #b00020;
  --tbm-error-bg: #ffe5e5;
  --tbm-error-border: #ffb4b4;

  --tbm-ok: #0f5132;
  --tbm-ok-bg: #d1e7dd;
  --tbm-ok-border: #badbcc;

  --tbm-overlay-bg: rgba(0, 0, 0, 0.82);
  --tbm-suggestion-hover: #fff9e0;

  --tbm-font: 'Oxanium', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --tbm-modal-width: 500px;
  --tbm-modal-max-height: 92vh;
  --tbm-field-height: 40px;
  --tbm-radius-field: 6px;
  --tbm-z: 2147483645;
}

/* --------------------------------------------------------------------------
   Estados ocultos
   -------------------------------------------------------------------------- */

#tbm-overlay[hidden],
#tbm-form[hidden],
#tbm-feedback[hidden],
#tbm-success[hidden],
#tbm-overlay .tbm-suggestions[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   Overlay
   -------------------------------------------------------------------------- */

#tbm-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--tbm-z);

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 16px;
  box-sizing: border-box;

  background: var(--tbm-overlay-bg);
}

#tbm-overlay,
#tbm-overlay * {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-modal {
  position: relative;

  display: flex;
  flex-direction: column;

  width: 100%;
  max-width: var(--tbm-modal-width);
  max-height: var(--tbm-modal-max-height);

  overflow: hidden;

  color: var(--tbm-text);
  background: var(--tbm-white);
  border: 2.5px solid var(--tbm-accent);

  font-family: var(--tbm-font);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-modal__header {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;

  padding: 14px 56px 14px 18px;

  color: var(--tbm-black);
  background: var(--tbm-accent);
}

#tbm-overlay .tbm-modal__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  width: 34px;
  height: 34px;

  color: var(--tbm-accent);
  background: var(--tbm-black);
}

#tbm-overlay .tbm-modal__title {
  margin: 0;

  color: var(--tbm-black);

  font-family: var(--tbm-font);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

#tbm-overlay .tbm-modal__subtitle {
  margin: 1px 0 0;

  color: var(--tbm-text-soft);

  font-family: var(--tbm-font);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.25;
}

/* --------------------------------------------------------------------------
   Cierre
   -------------------------------------------------------------------------- */

#tbm-overlay #tbm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  padding: 0;

  color: var(--tbm-accent);
  background: var(--tbm-black);
  border: 0;
  border-radius: 0;
  box-shadow: none;

  cursor: pointer;
}

#tbm-overlay #tbm-close:hover,
#tbm-overlay #tbm-close:focus-visible {
  background: #222222;
  outline: none;
}

/* --------------------------------------------------------------------------
   Formulario
   -------------------------------------------------------------------------- */

#tbm-overlay #tbm-form {
  display: flex;
  flex-direction: column;
  gap: 14px;

  padding: 22px 24px 26px;
  overflow-y: auto;

  color: var(--tbm-text);
  background: var(--tbm-white);

  font-family: var(--tbm-font);

  scrollbar-width: thin;
  scrollbar-color: var(--tbm-accent) #f5f5f5;
}

#tbm-overlay #tbm-form::-webkit-scrollbar {
  width: 4px;
}

#tbm-overlay #tbm-form::-webkit-scrollbar-track {
  background: #f5f5f5;
}

#tbm-overlay #tbm-form::-webkit-scrollbar-thumb {
  background: var(--tbm-accent);
}

/* --------------------------------------------------------------------------
   Honeypot
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-honeypot {
  position: absolute;
  top: -9999px;
  left: -9999px;

  width: 1px;
  height: 1px;

  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Campos
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#tbm-overlay .tbm-label {
  display: block;
  margin: 0 0 5px;

  color: #222222;

  font-family: var(--tbm-font);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

#tbm-overlay .tbm-label span {
  color: var(--tbm-accent-dark);
}

/* --------------------------------------------------------------------------
   Inputs base
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-modal input.tbm-input,
#tbm-overlay .tbm-modal textarea.tbm-textarea,
#tbm-overlay .tbm-modal select.tbm-select {
  width: 100%;
  min-height: var(--tbm-field-height);
  margin: 0;
  padding: 10px 12px;

  color: var(--tbm-text);
  -webkit-text-fill-color: var(--tbm-text);

  font-family: var(--tbm-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;

  background-color: var(--tbm-white);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-field);
  box-shadow: none;

  outline: none;
  opacity: 1;

  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    outline-color 0.18s ease;
}

#tbm-overlay .tbm-modal input.tbm-input::placeholder,
#tbm-overlay .tbm-modal textarea.tbm-textarea::placeholder {
  color: var(--tbm-placeholder);
  -webkit-text-fill-color: var(--tbm-placeholder);

  font-size: 12px;
  font-weight: 400;
  opacity: 1;
}

#tbm-overlay .tbm-modal input.tbm-input:hover,
#tbm-overlay .tbm-modal textarea.tbm-textarea:hover,
#tbm-overlay .tbm-modal select.tbm-select:hover,
#tbm-overlay .tbm-modal input.tbm-input:focus,
#tbm-overlay .tbm-modal textarea.tbm-textarea:focus,
#tbm-overlay .tbm-modal select.tbm-select:focus,
#tbm-overlay .tbm-modal input.tbm-input:active,
#tbm-overlay .tbm-modal textarea.tbm-textarea:active,
#tbm-overlay .tbm-modal select.tbm-select:active {
  color: var(--tbm-text);
  -webkit-text-fill-color: var(--tbm-text);

  background: var(--tbm-white);
  background-color: var(--tbm-white);
  border-color: var(--tbm-accent);

  box-shadow: 0 0 0 1000px var(--tbm-white) inset;
}

#tbm-overlay .tbm-modal input.tbm-input:focus,
#tbm-overlay .tbm-modal textarea.tbm-textarea:focus,
#tbm-overlay .tbm-modal select.tbm-select:focus {
  background: var(--tbm-white);
  background-color: var(--tbm-white);
  outline: 2px solid rgba(246, 196, 0, 0.22);
  outline-offset: 0;
  box-shadow: 0 0 0 1000px var(--tbm-white) inset;
}

#tbm-overlay .tbm-modal input.tbm-input[aria-invalid="true"],
#tbm-overlay .tbm-modal textarea.tbm-textarea[aria-invalid="true"],
#tbm-overlay .tbm-modal select.tbm-select[aria-invalid="true"] {
  border-color: var(--tbm-error);
}

#tbm-overlay .tbm-modal textarea.tbm-textarea {
  min-height: 72px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   Autofill
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-modal input.tbm-input:-webkit-autofill,
#tbm-overlay .tbm-modal input.tbm-input:-webkit-autofill:hover,
#tbm-overlay .tbm-modal input.tbm-input:-webkit-autofill:focus,
#tbm-overlay .tbm-modal textarea.tbm-textarea:-webkit-autofill,
#tbm-overlay .tbm-modal textarea.tbm-textarea:-webkit-autofill:hover,
#tbm-overlay .tbm-modal textarea.tbm-textarea:-webkit-autofill:focus,
#tbm-overlay .tbm-modal select.tbm-select:-webkit-autofill,
#tbm-overlay .tbm-modal select.tbm-select:-webkit-autofill:hover,
#tbm-overlay .tbm-modal select.tbm-select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--tbm-text);
  caret-color: var(--tbm-text);
  box-shadow: 0 0 0 1000px var(--tbm-white) inset;
}

/* --------------------------------------------------------------------------
   Selects
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-modal select.tbm-select {
  padding-right: 30px;

  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;

  background-color: var(--tbm-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

#tbm-overlay .tbm-modal select.tbm-select option {
  color: var(--tbm-text);
  background-color: var(--tbm-white);
  font-size: 13px;
}

#tbm-overlay .tbm-modal select.tbm-select option:checked {
  color: var(--tbm-text);
  background: linear-gradient(0deg, var(--tbm-suggestion-hover), var(--tbm-suggestion-hover));
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#tbm-overlay .tbm-phone-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 8px;
}

#tbm-overlay .tbm-select--prefix,
#tbm-overlay .tbm-input--phone {
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Autocomplete
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-autocomplete-wrap {
  position: relative;
}

#tbm-overlay .tbm-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: calc(var(--tbm-z) + 1);

  max-height: 200px;
  margin: 0;
  padding: 0;
  overflow-y: auto;

  list-style: none;

  background: var(--tbm-white);
  border: 1px solid var(--tbm-border);
  border-radius: var(--tbm-radius-field);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#tbm-overlay .tbm-suggestions li {
  padding: 10px 12px;

  color: var(--tbm-text);
  background: var(--tbm-white);
  border-bottom: 1px solid #f0f0f0;

  font-family: var(--tbm-font);
  font-size: 13px;
  line-height: 1.35;

  cursor: pointer;
}

#tbm-overlay .tbm-suggestions li:last-child {
  border-bottom: 0;
}

#tbm-overlay .tbm-suggestions li:hover,
#tbm-overlay .tbm-suggestions li[aria-selected="true"] {
  background: var(--tbm-suggestion-hover);
}

/* --------------------------------------------------------------------------
   Errores y feedback
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-error {
  min-height: 14px;

  color: var(--tbm-error);

  font-family: var(--tbm-font);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}

#tbm-overlay #tbm-feedback {
  margin: 0;
  padding: 10px 12px;

  font-family: var(--tbm-font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;

  border-radius: var(--tbm-radius-field);
}

#tbm-overlay .tbm-feedback--error {
  color: #7a0000;
  background: var(--tbm-error-bg);
  border: 1px solid var(--tbm-error-border);
}

#tbm-overlay .tbm-feedback--ok {
  color: var(--tbm-ok);
  background: var(--tbm-ok-bg);
  border: 1px solid var(--tbm-ok-border);
}

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */

#tbm-overlay .tbm-submit {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 100%;
  min-height: 54px;
  margin-top: 4px;
  padding: 15px 0;

  color: var(--tbm-black);
  background: linear-gradient(to bottom, var(--tbm-accent-light), var(--tbm-accent));
  border: 2px solid var(--tbm-black);
  border-radius: 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);

  font-family: var(--tbm-font);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;

  cursor: pointer;

  transition:
    background 0.22s ease,
    transform 0.18s ease,
    opacity 0.18s ease;
}

#tbm-overlay .tbm-submit:hover,
#tbm-overlay .tbm-submit:focus-visible {
  background: linear-gradient(to bottom, var(--tbm-accent), var(--tbm-accent-dark));
  outline: none;
  transform: translateY(-2px);
}

#tbm-overlay .tbm-submit:active {
  transform: translateY(0);
}

#tbm-overlay .tbm-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

#tbm-overlay .tbm-submit__spinner {
  display: none;

  width: 16px;
  height: 16px;

  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: var(--tbm-black);
  border-radius: 50%;

  animation: tbm-spin 0.7s linear infinite;
}

#tbm-overlay .tbm-submit.is-loading .tbm-submit__text {
  opacity: 0.5;
}

#tbm-overlay .tbm-submit.is-loading .tbm-submit__spinner {
  display: block;
}

@keyframes tbm-spin {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   Pantalla de éxito
   -------------------------------------------------------------------------- */

#tbm-overlay #tbm-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 48px 24px 56px;

  color: var(--tbm-text);
  background: var(--tbm-white);

  font-family: var(--tbm-font);
  text-align: center;
}

#tbm-overlay #tbm-success[hidden] {
  display: none;
}

#tbm-overlay .tbm-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 64px;
  height: 64px;
  margin-bottom: 24px;

  color: var(--tbm-black);
  background: var(--tbm-accent);
}

#tbm-overlay .tbm-success__title {
  margin: 0 0 10px;

  color: var(--tbm-text);

  font-family: var(--tbm-font);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

#tbm-overlay .tbm-success__text {
  max-width: 300px;
  margin: 0 0 32px;

  color: var(--tbm-text-muted);

  font-family: var(--tbm-font);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

#tbm-overlay #tbm-success .tbm-submit {
  max-width: 240px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 520px) {
  #tbm-overlay {
    padding: 12px;
  }

  #tbm-overlay .tbm-modal {
    max-width: calc(100vw - 24px);
  }

  #tbm-overlay #tbm-form {
    padding: 20px 14px 24px;
  }

  #tbm-overlay .tbm-modal__header {
    padding: 13px 52px 13px 16px;
  }

  #tbm-overlay .tbm-row,
  #tbm-overlay .tbm-phone-row {
    grid-template-columns: 1fr;
  }

  #tbm-overlay .tbm-submit {
    min-height: 50px;
    padding: 14px 0;
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  #tbm-overlay .tbm-modal__title {
    font-size: 12.5px;
  }

  #tbm-overlay .tbm-modal__subtitle {
    font-size: 10px;
  }

  #tbm-overlay #tbm-form {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #tbm-overlay .tbm-submit,
  #tbm-overlay .tbm-modal input.tbm-input,
  #tbm-overlay .tbm-modal textarea.tbm-textarea,
  #tbm-overlay .tbm-modal select.tbm-select {
    transition: none;
  }

  #tbm-overlay .tbm-submit__spinner {
    animation: none;
  }
}
