/* ==========================================================================
   GLAM FLOW STUDIO — GlamDatePicker
   Calendario visual con los tokens de marca (reemplaza el datetime-local
   nativo, cuyo popup del navegador no se puede re-estilizar y se salía
   del marco del modal).
   ========================================================================== */

.gdp { position: relative; }

.gdp-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: 0.75rem 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.gdp-trigger:hover,
.gdp-trigger:focus-visible {
  outline: none;
  border-color: var(--brand-rosa);
  box-shadow: 0 0 0 3px rgba(234, 157, 181, 0.18);
}
.gdp-icon { width: 18px; height: 18px; flex: none; color: var(--brand-rosa); }
.gdp-trigger-label { flex: 1; }
.gdp.is-empty .gdp-trigger-label { color: var(--color-text-faint); }

/* ---- Popover ---- */
.gdp-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1010;
  width: 300px;
  max-width: calc(100vw - 2rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: var(--space-4);
}
.gdp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.gdp-month-label {
  font-family: var(--font-display);
  font-size: var(--text-base);
  text-transform: capitalize;
}
.gdp-nav {
  background: none;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-pill);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.gdp-nav:hover { border-color: var(--brand-rosa); color: var(--brand-rosa); }

.gdp-weekdays,
.gdp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.gdp-weekdays { margin-bottom: 4px; }
.gdp-weekdays span {
  text-align: center;
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
}
.gdp-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.gdp-day:hover { background: var(--color-surface-2); }
.gdp-day.is-outside { color: var(--color-text-faint); opacity: 0.5; }
.gdp-day.is-today { box-shadow: inset 0 0 0 1px var(--brand-rosa); }
.gdp-day.is-selected { background: var(--brand-dorado); color: var(--brand-negro); font-weight: 700; }
.gdp-day.is-selected:hover { background: var(--brand-dorado); }
.gdp-day.is-disabled { color: var(--color-text-faint); opacity: 0.3; cursor: not-allowed; }
.gdp-day.is-disabled:hover { background: none; }

/* ---- Tabs Fecha / Hora ---- */
.gdp-tabs {
  display: flex;
  gap: 4px;
  background: var(--color-bg);
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: var(--space-4);
}
.gdp-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 8px 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.gdp-tab.is-active { background: var(--brand-rosa); color: var(--brand-negro); }

/* ---- Reloj analógico ---- */
.gdp-clock-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.gdp-clock-digit {
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  padding: 4px 10px;
  cursor: pointer;
  min-width: 64px;
  text-align: center;
}
.gdp-clock-digit.is-active { border-color: var(--brand-rosa); color: var(--brand-rosa); }
.gdp-clock-colon { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--color-text-muted); }
.gdp-ampm { display: flex; flex-direction: column; gap: 4px; margin-left: var(--space-2); }
.gdp-ampm button {
  background: none;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-xs);
  padding: 3px 8px;
  cursor: pointer;
}
.gdp-ampm button.is-active { background: var(--brand-dorado); color: var(--brand-negro); border-color: var(--brand-dorado); }

.gdp-clock-face {
  position: relative;
  width: 216px;
  height: 216px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
}
.gdp-clock-center {
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-rosa);
  transform: translate(-50%, -50%);
  z-index: 2;
}
.gdp-clock-hand {
  position: absolute;
  top: 50%; left: 50%;
  width: 2px; height: 80px;
  background: var(--brand-rosa);
  transform-origin: top center;
  transform: rotate(0deg);
  border-radius: 2px;
}
.gdp-clock-num {
  position: absolute;
  width: 32px; height: 32px;
  margin-left: -16px; margin-top: -16px;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.gdp-clock-num:hover { background: var(--color-surface-2); }
.gdp-clock-num.is-selected { background: var(--brand-dorado); color: var(--brand-negro); font-weight: 700; }

.gdp-footer { margin-top: var(--space-4); display: flex; justify-content: flex-end; }
.gdp-close {
  background: var(--brand-rosa);
  color: var(--brand-negro);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.3rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
}
.gdp-close:hover { transform: translateY(-1px); }
