/* TurnosTech Public Styles */
:root {
  --tt-primary:   #1a5fa8;
  --tt-secondary: #4a9fd4;
  --tt-light:     #e8f4fd;
  --tt-gray:      #f4f7fb;
  --tt-border:    #d0e3f5;
  --tt-text:      #2c3e50;
  --tt-success:   #27ae60;
  --tt-error:     #e74c3c;
  --tt-radius:    10px;
  --tt-shadow:    0 4px 20px rgba(26,95,168,.12);
}

#tt-booking-app * { box-sizing: border-box; }

#tt-booking-app {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--tt-text);
  max-width: 820px;
  margin: 0 auto;
  padding: 0 12px;
}

/* Header */
.tt-header {
  background: linear-gradient(135deg, var(--tt-primary), var(--tt-secondary));
  border-radius: var(--tt-radius) var(--tt-radius) 0 0;
  padding: 28px 32px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
}
.tt-header-icon { font-size: 36px; }
.tt-header h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.tt-header p  { margin: 4px 0 0; opacity: .85; font-size: 14px; }

/* Steps indicator */
.tt-steps {
  background: #fff;
  border: 1px solid var(--tt-border);
  border-top: none;
  padding: 16px 24px;
  display: flex;
  gap: 0;
}
.tt-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #aaa;
  position: relative;
}
.tt-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 30px;
  background: var(--tt-border);
}
.tt-step.active { color: var(--tt-primary); }
.tt-step.done   { color: var(--tt-success); }
.tt-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--tt-border);
  color: #888;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.tt-step.active .tt-step-num { background: var(--tt-primary); color: #fff; }
.tt-step.done   .tt-step-num { background: var(--tt-success); color: #fff; }

/* Card container */
.tt-card {
  background: #fff;
  border: 1px solid var(--tt-border);
  border-top: none;
  border-radius: 0 0 var(--tt-radius) var(--tt-radius);
  padding: 28px 32px;
  box-shadow: var(--tt-shadow);
}

/* Section titles */
.tt-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--tt-primary);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tt-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Form grid */
.tt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tt-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.tt-grid-1 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.tt-col-span-2 { grid-column: span 2; }

/* Field */
.tt-field { display: flex; flex-direction: column; gap: 5px; }
.tt-field label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.tt-field label .req { color: var(--tt-error); margin-left: 2px; }
.tt-field input,
.tt-field select,
.tt-field textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--tt-border);
  border-radius: 7px;
  font-size: 14px;
  color: var(--tt-text);
  background: var(--tt-gray);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  font-family: inherit;
  width: 100%;
}
.tt-field input:focus,
.tt-field select:focus,
.tt-field textarea:focus {
  border-color: var(--tt-secondary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,159,212,.15);
}
.tt-field input.tt-invalid,
.tt-field select.tt-invalid { border-color: var(--tt-error) !important; }
.tt-field .tt-hint { font-size: 11px; color: #999; }
.tt-field .tt-error-msg { font-size: 11px; color: var(--tt-error); display: none; }
.tt-field.has-error .tt-error-msg { display: block; }

.tt-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a9fd4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* Quantity selector */
.tt-qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--tt-border);
  border-radius: 7px;
  overflow: hidden;
  background: var(--tt-gray);
  width: fit-content;
}
.tt-qty-btn {
  background: var(--tt-light);
  border: none;
  width: 38px; height: 40px;
  cursor: pointer;
  font-size: 18px;
  color: var(--tt-primary);
  transition: background .2s;
  display: flex; align-items: center; justify-content: center;
}
.tt-qty-btn:hover { background: var(--tt-secondary); color: #fff; }
.tt-qty-input {
  width: 56px !important;
  text-align: center;
  border: none !important;
  border-left: 1.5px solid var(--tt-border) !important;
  border-right: 1.5px solid var(--tt-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
  font-weight: 700;
  font-size: 16px !important;
  padding: 0 !important;
  height: 40px;
}

/* Divider */
.tt-divider { height: 1px; background: var(--tt-border); margin: 24px 0; }

/* Calendar */
.tt-calendar-wrap { margin: 0; }
.tt-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.tt-cal-nav button {
  background: var(--tt-light);
  border: 1.5px solid var(--tt-border);
  border-radius: 6px;
  width: 34px; height: 34px;
  cursor: pointer;
  color: var(--tt-primary);
  font-size: 16px;
  transition: background .2s;
}
.tt-cal-nav button:hover { background: var(--tt-secondary); color: #fff; border-color: var(--tt-secondary); }
.tt-cal-month { font-weight: 700; color: var(--tt-primary); font-size: 15px; text-transform: capitalize; }
.tt-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.tt-cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  padding: 6px 0;
}
.tt-cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  font-size: 13px;
  cursor: default;
  transition: all .15s;
  border: 1.5px solid transparent;
}
.tt-cal-day.available {
  background: var(--tt-light);
  color: var(--tt-primary);
  cursor: pointer;
  font-weight: 600;
}
.tt-cal-day.available:hover {
  background: var(--tt-secondary);
  color: #fff;
  border-color: var(--tt-secondary);
}
.tt-cal-day.selected {
  background: var(--tt-primary) !important;
  color: #fff !important;
  border-color: var(--tt-primary) !important;
  font-weight: 700;
}
.tt-cal-day.today { border-color: var(--tt-secondary); }
.tt-cal-day.empty, .tt-cal-day.past, .tt-cal-day.unavailable { color: #ccc; }
.tt-cal-day.past { background: #fafafa; }
.tt-cal-loading { text-align: center; padding: 20px; color: #aaa; font-size: 13px; }

/* Hours */
.tt-hours-wrap { margin-top: 18px; }
.tt-hours-title { font-size: 13px; font-weight: 600; color: #666; margin-bottom: 10px; }
.tt-hours-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tt-hour-btn {
  padding: 8px 16px;
  border: 1.5px solid var(--tt-border);
  border-radius: 20px;
  background: var(--tt-gray);
  color: var(--tt-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.tt-hour-btn:hover { background: var(--tt-secondary); color: #fff; border-color: var(--tt-secondary); }
.tt-hour-btn.selected { background: var(--tt-primary); color: #fff; border-color: var(--tt-primary); }
.tt-no-hours { color: #aaa; font-size: 13px; font-style: italic; }

/* Precio preview */
.tt-precio-box {
  background: linear-gradient(135deg, var(--tt-primary), #1a3a7a);
  color: #fff;
  border-radius: var(--tt-radius);
  padding: 20px 24px;
  margin: 20px 0;
}
.tt-precio-box .tt-precio-row {
  display: flex; justify-content: space-between;
  font-size: 13px; padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.tt-precio-box .tt-precio-row:last-child { border: none; }
.tt-precio-box .tt-precio-total {
  font-size: 20px; font-weight: 700;
  padding-top: 10px; margin-top: 6px;
  border-top: 1px solid rgba(255,255,255,.3);
}
.tt-precio-box .tt-precio-anticipo {
  font-size: 15px; font-weight: 700;
  background: rgba(255,255,255,.15);
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 8px;
}
.tt-precio-box .tt-precio-nota {
  font-size: 11px; opacity: .75; margin-top: 6px; font-style: italic;
}
.tt-descuento-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #27ae60; color: #fff;
  padding: 4px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
  margin-bottom: 8px;
}

/* TyC Checkbox */
.tt-tyc-wrap {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px;
  background: var(--tt-gray);
  border-radius: 7px;
  border: 1.5px solid var(--tt-border);
}
.tt-tyc-wrap input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; cursor: pointer;
  accent-color: var(--tt-primary);
}
.tt-tyc-wrap label { font-size: 13px; color: #555; cursor: pointer; line-height: 1.5; }
.tt-tyc-wrap a { color: var(--tt-primary); font-weight: 600; text-decoration: none; }
.tt-tyc-wrap a:hover { text-decoration: underline; }

/* Timer */
.tt-timer-bar {
  background: #fff8e1;
  border: 1.5px solid #f39c12;
  border-radius: 7px;
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #7d5a00;
  margin-bottom: 16px;
}
.tt-timer-bar .tt-timer-count { font-weight: 700; font-size: 15px; }

/* Buttons */
.tt-btn {
  padding: 13px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.tt-btn-primary {
  background: linear-gradient(135deg, var(--tt-primary), var(--tt-secondary));
  color: #fff;
  box-shadow: 0 4px 12px rgba(26,95,168,.3);
}
.tt-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(26,95,168,.4); }
.tt-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.tt-btn-success {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
  box-shadow: 0 4px 12px rgba(39,174,96,.3);
}
.tt-btn-success:hover { transform: translateY(-1px); }
.tt-btn-outline {
  background: transparent;
  border: 2px solid var(--tt-primary);
  color: var(--tt-primary);
}
.tt-btn-outline:hover { background: var(--tt-light); }

/* Alert */
.tt-alert {
  padding: 12px 16px;
  border-radius: 7px;
  font-size: 13px;
  margin: 12px 0;
  display: flex; align-items: flex-start; gap: 10px;
}
.tt-alert-error   { background: #fdf0f0; border: 1px solid #f5c6cb; color: #721c24; }
.tt-alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.tt-alert-info    { background: var(--tt-light); border: 1px solid var(--tt-border); color: var(--tt-primary); }
.tt-alert-promo   { background: #fff8e1; border: 1px solid #f5c842; color: #7d5a00; font-size: 13px; }

/* Success screen */
.tt-success-screen {
  text-align: center;
  padding: 40px 20px;
}
.tt-success-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: tt-bounce .5s ease;
}
@keyframes tt-bounce {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.tt-success-screen h2 { color: var(--tt-success); font-size: 26px; margin: 0 0 12px; }
.tt-success-screen p  { color: #555; font-size: 15px; max-width: 480px; margin: 0 auto 8px; line-height: 1.6; }
.tt-success-codigo {
  display: inline-block;
  background: var(--tt-light);
  color: var(--tt-primary);
  font-weight: 700;
  font-size: 18px;
  padding: 8px 20px;
  border-radius: 30px;
  margin: 14px 0;
  letter-spacing: 1px;
}

/* Loader */
.tt-spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tt-spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes tt-spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 600px) {
  .tt-header { padding: 20px; }
  .tt-card { padding: 20px; }
  .tt-grid-2, .tt-grid-3 { grid-template-columns: 1fr; }
  .tt-col-span-2 { grid-column: span 1; }
  .tt-steps { gap: 4px; font-size: 11px; }
  .tt-step-num { width: 22px; height: 22px; font-size: 11px; }
}

/* ── PayWay card form ──────────────────────────────────────── */
.tt-card-brand-badge {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  min-height: 20px;
  color: var(--tt-primary);
}

#tt-payway-form input[data-decidir],
#tt-payway-form select[data-decidir] {
  width: 100%;
}

#tt-pago-procesando .tt-spinner {
  border: 4px solid rgba(0,0,0,.1);
  border-top-color: var(--tt-primary);
  border-radius: 50%;
  animation: tt-spin .8s linear infinite;
}

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