/* ===== Despega LLC — Widget de Agendamiento ===== */
#dpg-cal-bubble {
  position: fixed; right: 20px; bottom: 96px; z-index: 9997;
  width: 62px; height: 62px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #c9a227, #a8851c);
  box-shadow: 0 8px 28px rgba(201, 162, 39, .45);
  display: flex; align-items: center; justify-content: center;
  transition: transform .22s ease, box-shadow .22s ease;
  -webkit-tap-highlight-color: transparent;
}
#dpg-cal-bubble:hover { transform: scale(1.07); box-shadow: 0 10px 34px rgba(201,162,39,.62); }
#dpg-cal-bubble svg { width: 31px; height: 31px; fill: #06142b; }
#dpg-cal-bubble::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid #c9a227; animation: dpg-cal-pulse 2.4s ease-out infinite; pointer-events: none;
}
#dpg-cal-bubble.dpg-seen::after { animation: none; opacity: 0; }
@keyframes dpg-cal-pulse {
  0% { transform: scale(1); opacity: .75; }
  70% { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { #dpg-cal-bubble::after { animation: none; } }

/* Overlay */
#dpg-cal-overlay {
  position: fixed; inset: 0; z-index: 10000; background: rgba(6,20,43,.62);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s;
  font-family: var(--font-body, system-ui), sans-serif;
}
#dpg-cal-overlay.dpg-open { opacity: 1; visibility: visible; }

/* Modal */
#dpg-cal-modal {
  width: 660px; max-width: 100%; max-height: calc(100vh - 40px);
  background: #fff; border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 28px 80px rgba(6,20,43,.45);
  transform: translateY(16px) scale(.98); transition: transform .24s cubic-bezier(.2,.8,.3,1);
}
#dpg-cal-overlay.dpg-open #dpg-cal-modal { transform: translateY(0) scale(1); }

/* Header */
#dpg-cal-head {
  background: linear-gradient(135deg, #0a1e3c, #12294d); color: #fff;
  padding: 22px 26px; display: flex; align-items: flex-start; gap: 16px; flex: 0 0 auto;
}
#dpg-cal-head-icon {
  width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto;
  background: rgba(201,162,39,.16); border: 1px solid rgba(201,162,39,.4);
  display: flex; align-items: center; justify-content: center;
}
#dpg-cal-head-icon svg { width: 24px; height: 24px; fill: #ddb93f; }
#dpg-cal-head h3 { margin: 0 0 4px; font: 700 19px var(--font-display, system-ui), sans-serif; letter-spacing: -.2px; }
#dpg-cal-head p { margin: 0; font-size: 12.5px; opacity: .78; line-height: 1.45; }
#dpg-cal-x {
  margin-left: auto; background: rgba(255,255,255,.1); border: 0; color: #fff;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; flex: 0 0 auto;
}
#dpg-cal-x:hover { background: rgba(255,255,255,.22); }

/* Steps bar */
#dpg-cal-steps { display: flex; gap: 0; background: #f4f6f9; border-bottom: 1px solid #e3e8ef; flex: 0 0 auto; }
.dpg-step {
  flex: 1; padding: 11px 8px; text-align: center; font-size: 11.5px; font-weight: 600;
  color: #7b8798; border-bottom: 2.5px solid transparent; transition: all .18s ease;
}
.dpg-step.on { color: #0a1e3c; border-bottom-color: #c9a227; background: #fff; }
.dpg-step.done { color: #1a7f4e; }
.dpg-step b {
  display: inline-block; width: 17px; height: 17px; border-radius: 50%; margin-right: 5px;
  background: #e3e8ef; color: #46536b; font-size: 10.5px; line-height: 17px; text-align: center;
}
.dpg-step.on b { background: #c9a227; color: #fff; }
.dpg-step.done b { background: #1a7f4e; color: #fff; }

/* Body */
#dpg-cal-body { padding: 22px 26px; overflow-y: auto; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.dpg-pane { display: none; }
.dpg-pane.on { display: block; animation: dpg-fade .22s ease; }
@keyframes dpg-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Fields */
.dpg-field { margin-bottom: 15px; }
.dpg-field label {
  display: block; font-size: 12.5px; font-weight: 700; color: #0a1e3c;
  margin-bottom: 6px; letter-spacing: .1px;
}
.dpg-field label span { color: #c0392b; }
.dpg-field input, .dpg-field select, .dpg-field textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid #e3e8ef; border-radius: 10px;
  font: 400 14px var(--font-body, system-ui), sans-serif; color: #10192b;
  background: #fff; transition: border-color .16s ease, box-shadow .16s ease;
  box-sizing: border-box;
}
.dpg-field input:focus, .dpg-field select:focus, .dpg-field textarea:focus {
  outline: none; border-color: #c9a227; box-shadow: 0 0 0 3px rgba(201,162,39,.14);
}
.dpg-field textarea { resize: vertical; min-height: 84px; font-family: inherit; }
.dpg-field input.err, .dpg-field textarea.err, .dpg-field select.err { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.1); }
.dpg-err-msg { display: none; font-size: 11.5px; color: #c0392b; margin-top: 5px; }
.dpg-err-msg.on { display: block; }
.dpg-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Date grid */
.dpg-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 6px; }
.dpg-day {
  padding: 11px 4px; border: 1.5px solid #e3e8ef; border-radius: 10px; background: #fff;
  cursor: pointer; text-align: center; transition: all .16s ease;
}
.dpg-day:hover:not(:disabled) { border-color: #c9a227; background: #faf3dc; }
.dpg-day.on { border-color: #c9a227; background: #0a1e3c; }
.dpg-day.on .dow, .dpg-day.on .dom { color: #fff; }
.dpg-day:disabled { opacity: .32; cursor: not-allowed; background: #f4f6f9; }
.dpg-day .dow { display: block; font-size: 10.5px; font-weight: 700; color: #7b8798; text-transform: uppercase; letter-spacing: .4px; }
.dpg-day .dom { display: block; font-size: 17px; font-weight: 700; color: #0a1e3c; margin-top: 2px; }
.dpg-day .mon { display: block; font-size: 9.5px; color: #7b8798; text-transform: uppercase; }
.dpg-day.on .mon { color: rgba(255,255,255,.7); }

/* Time grid */
.dpg-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dpg-time {
  padding: 10px 4px; border: 1.5px solid #e3e8ef; border-radius: 9px; background: #fff;
  cursor: pointer; font: 600 13px var(--font-body, system-ui), sans-serif; color: #0a1e3c;
  transition: all .16s ease;
}
.dpg-time:hover:not(:disabled) { border-color: #c9a227; background: #faf3dc; }
.dpg-time.on { background: #c9a227; border-color: #c9a227; color: #fff; }
.dpg-time:disabled { opacity: .3; cursor: not-allowed; text-decoration: line-through; background: #f4f6f9; }

.dpg-sec-title {
  font-size: 12.5px; font-weight: 700; color: #0a1e3c; margin: 0 0 9px;
  display: flex; align-items: center; gap: 7px;
}
.dpg-sec-title::before { content: ""; width: 3px; height: 14px; background: #c9a227; border-radius: 2px; }
.dpg-hint { font-size: 11.5px; color: #7b8798; margin: 0 0 12px; line-height: 1.5; }
.dpg-tz {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  color: #46536b; background: #f4f6f9; border: 1px solid #e3e8ef; border-radius: 20px;
  padding: 4px 11px; margin-bottom: 14px;
}
.dpg-tz::before { content: "🌎"; font-size: 11px; }

/* Summary */
.dpg-summary { background: #f4f6f9; border: 1px solid #e3e8ef; border-radius: 12px; padding: 15px 17px; margin-bottom: 4px; }
.dpg-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed #e3e8ef; }
.dpg-summary-row:last-child { border-bottom: 0; }
.dpg-summary-row dt { color: #7b8798; font-weight: 600; flex: 0 0 auto; }
.dpg-summary-row dd { margin: 0; color: #10192b; font-weight: 600; text-align: right; word-break: break-word; }

/* Footer */
#dpg-cal-foot {
  padding: 15px 26px 19px; border-top: 1px solid #e3e8ef; background: #fff;
  display: flex; gap: 11px; align-items: center; flex: 0 0 auto;
}
.dpg-btn {
  padding: 12px 22px; border-radius: 10px; border: 1.5px solid #e3e8ef; background: #fff;
  font: 700 14px var(--font-body, system-ui), sans-serif; color: #46536b; cursor: pointer;
  transition: all .17s ease;
}
.dpg-btn:hover { background: #f4f6f9; border-color: #cbd5e1; }
.dpg-btn.primary {
  background: #c9a227; border-color: #c9a227; color: #fff; margin-left: auto;
  box-shadow: 0 5px 18px rgba(201,162,39,.32);
}
.dpg-btn.primary:hover { background: #a8851c; border-color: #a8851c; transform: translateY(-1px); }
.dpg-btn.primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Success */
#dpg-cal-success { text-align: center; padding: 16px 6px 8px; }
.dpg-check {
  width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%; background: #1a7f4e;
  display: flex; align-items: center; justify-content: center;
  animation: dpg-pop .42s cubic-bezier(.2,1.3,.4,1) both;
}
@keyframes dpg-pop { from { transform: scale(0); } to { transform: scale(1); } }
.dpg-check svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
#dpg-cal-success h3 { margin: 0 0 9px; font: 700 21px var(--font-display, system-ui), sans-serif; color: #0a1e3c; }
#dpg-cal-success > p { margin: 0 0 18px; font-size: 13.5px; color: #46536b; line-height: 1.6; }
.dpg-recap {
  background: #f4f6f9; border-left: 4px solid #c9a227; border-radius: 10px;
  padding: 14px 17px; text-align: left; margin-bottom: 18px; font-size: 13px; line-height: 1.7; color: #10192b;
}
.dpg-recap b { color: #0a1e3c; }
.dpg-addcal {
  display: inline-block; padding: 12px 22px; background: #0a1e3c; color: #fff;
  border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 13.5px;
  transition: all .17s ease;
}
.dpg-addcal:hover { background: #12294d; transform: translateY(-1px); }

.dpg-loading { text-align: center; padding: 40px 0; color: #7b8798; font-size: 13.5px; }
.dpg-spin {
  width: 32px; height: 32px; margin: 0 auto 14px; border: 3px solid #f4f6f9;
  border-top-color: #c9a227; border-radius: 50%; animation: dpg-rot .8s linear infinite;
}
@keyframes dpg-rot { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  #dpg-cal-bubble { width: 56px; height: 56px; bottom: 88px; }
  #dpg-cal-overlay { padding: 0; align-items: flex-end; }
  #dpg-cal-modal { max-height: 94vh; border-radius: 20px 20px 0 0; }
  #dpg-cal-head { padding: 18px 18px 16px; }
  #dpg-cal-head h3 { font-size: 17px; }
  #dpg-cal-body { padding: 18px; }
  #dpg-cal-foot { padding: 13px 18px 17px; }
  .dpg-row2 { grid-template-columns: 1fr; gap: 0; }
  .dpg-times { grid-template-columns: repeat(3, 1fr); }
  .dpg-step { font-size: 10px; padding: 9px 3px; }
  .dpg-step b { display: none; }
}
