/* ==========================================================
   Huesca "Mi Plan" Widget — CSS
   ========================================================== */

:root {
  --hp-primary: rgb(24, 60, 105);
  --hp-primary-light: rgba(24, 60, 105, 0.05);
  --hp-bg: #ffffff;
  --hp-text: #333333;
  --hp-text-soft: #666666;
  --hp-border: #e0e0e0;
  --hp-danger: #d32f2f;
  --hp-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --hp-z: 99990;
  --hp-panel-w: 505px;
  --hp-fab-size: 50px;
  --hp-radius: 4px;
}

/* ===== Reset ===== */
#hplan-root,
#hplan-root *,
#hplan-root *::before,
#hplan-root *::after {
  box-sizing: border-box;
  line-height: 1.6;
}

#hplan-root {
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 14px;
  color: var(--hp-text);
  font-weight: 400;
}

/* =========================================================
   FAB Buttons (two stacked)
   ========================================================= */
.hplan-fab-unified {
  position: fixed;
  right: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border: none;
  border-radius: 28px;
  cursor: pointer;
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  z-index: var(--hp-z);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.hplan-fab-unified:hover { transform: translateY(-2px); }
.hplan-fab-unified:active { transform: translateY(0) scale(0.97); }

/* Botón principal: Planificar tu visita */
.hplan-fab-plan {
  bottom: 80px;
  background: var(--hp-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(24, 60, 105, 0.30) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.hplan-fab-plan:hover {
  background: var(--hp-primary) !important;
  color: #fff !important;
  box-shadow: 0 6px 24px rgba(24, 60, 105, 0.40) !important;
}

/* Botón secundario: Ver mi plan */
.hplan-fab-miplan {
  bottom: 140px;
  background: #fff !important;
  color: var(--hp-primary) !important;
  border: 2px solid var(--hp-primary) !important;
  box-shadow: 0 4px 16px rgba(24, 60, 105, 0.15) !important;
}
.hplan-fab-miplan:hover {
  background: #f8fafc !important;
  color: var(--hp-primary) !important;
  border-color: var(--hp-primary) !important;
  box-shadow: 0 6px 20px rgba(24, 60, 105, 0.22) !important;
}

.hplan-fab-unified__text {
  white-space: nowrap;
}

.hplan-fab-unified__badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--hp-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 0 6px;
  flex-shrink: 0;
}

/* Badge del botón "Ver mi plan" tiene colores invertidos */
.hplan-fab-miplan .hplan-fab-unified__badge {
  background: var(--hp-primary);
  color: #fff;
}

/* Nudge effect: draws attention when an item is added */
.hplan-fab-miplan.is-nudge {
  z-index: calc(var(--hp-z) + 10);
  animation: fabNudge 1.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hplan-fab-miplan.is-nudge .hplan-fab-unified__badge {
  animation: badgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes fabNudge {
  0%   { transform: translateY(0) scale(1); box-shadow: 0 4px 16px rgba(24, 60, 105, 0.15); }
  12%  { transform: translateY(-8px) scale(1.08); box-shadow: 0 8px 32px rgba(24, 60, 105, 0.35), 0 0 0 0 rgba(24, 60, 105, 0.3); }
  20%  { transform: translateY(-8px) scale(1.08); box-shadow: 0 8px 32px rgba(24, 60, 105, 0.35), 0 0 0 8px rgba(24, 60, 105, 0.15); }
  35%  { transform: translateY(-4px) scale(1.04); box-shadow: 0 6px 24px rgba(24, 60, 105, 0.25), 0 0 0 16px rgba(24, 60, 105, 0); }
  55%  { transform: translateY(-6px) scale(1.06); box-shadow: 0 8px 28px rgba(24, 60, 105, 0.30), 0 0 0 0 rgba(24, 60, 105, 0.2); }
  65%  { transform: translateY(-6px) scale(1.06); box-shadow: 0 8px 28px rgba(24, 60, 105, 0.30), 0 0 0 6px rgba(24, 60, 105, 0.1); }
  80%  { transform: translateY(-2px) scale(1.02); box-shadow: 0 5px 18px rgba(24, 60, 105, 0.18), 0 0 0 12px rgba(24, 60, 105, 0); }
  100% { transform: translateY(0) scale(1); box-shadow: 0 4px 16px rgba(24, 60, 105, 0.15); }
}

@keyframes badgePop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* =========================================================
   Backdrop
   ========================================================= */
.hplan-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: calc(var(--hp-z) + 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.hplan-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* =========================================================
   Modal (Iframe Container)
   ========================================================= */
.hplan-modal {
  position: fixed;
  inset: 45px calc(20% + 15px); /* Reducido 15px de cada lado para quitar aire */
  z-index: calc(var(--hp-z) + 2);
  background: #dfebf4; /* Mismo color que la app React para que sea seamless */
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  overflow: hidden;
}

.hplan-modal.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.hplan-modal__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  pointer-events: none; /* Deja pasar clicks al iframe debajo */
  background: linear-gradient(to bottom, #dfebf4 60%, transparent 100%);
}

.hplan-modal__back,
.hplan-modal__close {
  pointer-events: auto; /* Los botones sí son clickeables */
}

.hplan-modal__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--hp-primary);
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  outline: none;
}

.hplan-modal__back:hover {
  background: rgba(24, 60, 105, 0.08);
}

.hplan-modal__back:active {
  background: rgba(24, 60, 105, 0.15);
}

.hplan-modal__back-icon {
  display: flex;
  align-items: center;
}

.hplan-modal__back-icon svg {
  width: 18px;
  height: 18px;
}

.hplan-modal__back-text {
  pointer-events: none;
}

.hplan-modal__close {
  width: 36px;
  height: 36px;
  background: none;
  color: var(--hp-text);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  outline: none;
}

.hplan-modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.hplan-modal__close svg {
  width: 20px;
  height: 20px;
}

.hplan-iframe {
  width: 100%;
  flex: 1;
  min-height: 0;
  border: none;
  border-radius: 0 0 12px 12px;
  background: transparent;
}

@media (max-width: 768px) {
  .hplan-modal {
    inset: 10px;
  }
  .hplan-modal__back-text {
    display: none;
  }
  .hplan-modal__back {
    padding: 8px;
  }
}

/* =========================================================
   Panel (LEGACY - COMENTADO A PETICIÓN DEL CLIENTE)
   ========================================================= 
.hplan-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: var(--hp-panel-w);
  height: auto;
  max-height: 70vh;
  background: var(--hp-bg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  z-index: calc(var(--hp-z) + 2);
  display: flex;
  flex-direction: column;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.4s ease;
}
.hplan-panel.is-open {
  transform: translateX(0);
}

/* --- Header --- */
.hplan-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
  background: var(--hp-bg);
  border-bottom: 1px solid var(--hp-border);
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
}

.hplan-panel__title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hplan-panel__title {
  font-size: 20px;
  color: var(--hp-primary);
  font-weight: 400;
}

.hplan-panel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 12px;
  background: var(--hp-primary-light);
  color: var(--hp-primary);
  font-size: 13px;
  padding: 0 8px;
}

.hplan-panel__close {
  background: transparent;
  border: none;
  color: var(--hp-text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  transition: color 0.2s;
}
.hplan-panel__close:hover {
  color: var(--hp-primary);
}
.hplan-panel__close svg {
  width: 20px;
  height: 20px;
}

/* --- Body --- */
.hplan-panel__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- Footer --- */
.hplan-panel__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--hp-border);
  background: var(--hp-bg);
  flex-shrink: 0;
  border-radius: 0 0 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hplan-btn-clear {
  padding: 12px 16px;
  border: 1px solid var(--hp-border);
  background: transparent;
  color: var(--hp-text-soft);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
  border-radius: var(--hp-radius);
}
.hplan-btn-clear:hover {
  border-color: var(--hp-danger);
  color: var(--hp-danger);
  background: rgba(211, 47, 47, 0.05);
}
.hplan-btn-clear svg {
  width: 16px;
  height: 16px;
}

.hplan-btn-primary {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: var(--hp-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: inherit;
  border-radius: var(--hp-radius);
}
.hplan-btn-primary:hover {
  background: #122f53;
  transform: translateY(-1px);
}

/* =========================================================
   Item Card
   ========================================================= */
.hplan-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--hp-border);
  background: #fff;
  flex-shrink: 0;
  animation: hplan-fadeIn 0.25s ease both;
}
.hplan-item:last-child {
  margin-bottom: 0;
}

/* Image */
.hplan-item__img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  background: var(--hp-primary-light);
  flex-shrink: 0;
  clip-path: polygon(50% 0%, 58.6% 6.9%, 69.1% 3.8%, 74.5% 13.4%, 85.4% 14.6%, 86.6% 25.5%, 96.2% 30.9%, 93.1% 41.4%, 100% 50%, 93.1% 58.6%, 96.2% 69.1%, 86.6% 74.5%, 85.4% 85.4%, 74.5% 86.6%, 69.1% 96.2%, 58.6% 93.1%, 50% 100%, 41.4% 93.1%, 30.9% 96.2%, 25.5% 86.6%, 14.6% 85.4%, 13.4% 74.5%, 3.8% 69.1%, 6.9% 58.6%, 0% 50%, 6.9% 41.4%, 3.8% 30.9%, 13.4% 25.5%, 14.6% 14.6%, 25.5% 13.4%, 30.9% 3.8%, 41.4% 6.9%);
}

.hplan-item__img--fallback {
  width: 70px;
  height: 70px;
  background: var(--hp-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hp-primary);
  flex-shrink: 0;
  clip-path: polygon(50% 0%, 58.6% 6.9%, 69.1% 3.8%, 74.5% 13.4%, 85.4% 14.6%, 86.6% 25.5%, 96.2% 30.9%, 93.1% 41.4%, 100% 50%, 93.1% 58.6%, 96.2% 69.1%, 86.6% 74.5%, 85.4% 85.4%, 74.5% 86.6%, 69.1% 96.2%, 58.6% 93.1%, 50% 100%, 41.4% 93.1%, 30.9% 96.2%, 25.5% 86.6%, 14.6% 85.4%, 13.4% 74.5%, 3.8% 69.1%, 6.9% 58.6%, 0% 50%, 6.9% 41.4%, 3.8% 30.9%, 13.4% 25.5%, 14.6% 14.6%, 25.5% 13.4%, 30.9% 3.8%, 41.4% 6.9%);
}
.hplan-item__img--fallback svg {
  width: 24px;
  height: 24px;
  opacity: 0.5;
}

/* Info */
.hplan-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hplan-item__category {
  font-size: 11px;
  color: var(--hp-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hplan-item__title {
  font-size: 15px;
  color: var(--hp-primary);
  line-height: 1.4;
}

/* Remove button */
.hplan-item__remove {
  background: transparent;
  border: none;
  color: var(--hp-text-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  transition: color 0.2s;
  flex-shrink: 0;
}
.hplan-item__remove:hover {
  color: var(--hp-danger);
}
.hplan-item__remove svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   Empty State
   ========================================================= */
.hplan-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 50px 20px;
  text-align: center;
  color: var(--hp-text-soft);
}

.hplan-empty__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--hp-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hp-primary);
  margin-bottom: 10px;
}
.hplan-empty__icon svg {
  width: 28px;
  height: 28px;
}

.hplan-empty__title {
  font-size: 18px;
  color: var(--hp-primary);
}

.hplan-empty__text {
  font-size: 14px;
  max-width: 280px;
  line-height: 1.6;
}

/* =========================================================
   Toast
   ========================================================= */
.hplan-toast {
  position: fixed;
  bottom: 140px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: var(--hp-primary);
  color: #fff;
  font-size: 14px;
  border-radius: var(--hp-radius);
  box-shadow: var(--hp-shadow);
  z-index: calc(var(--hp-z) + 10);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.hplan-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
*/

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 480px) {
  .hplan-fab-plan  { right: 16px; bottom: 20px; font-size: 13px; padding: 11px 18px; }
  .hplan-fab-miplan { right: 16px; bottom: 78px; font-size: 13px; padding: 11px 18px; }
  .hplan-panel { width: 100%; border-left: none; border-top: 3px dashed var(--hp-border); }
}

/* =========================================================
   Panel lateral (Mi Plan)
   ========================================================= */
.hplan-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: var(--hp-panel-w);
  height: auto;
  max-height: 60dvh;
  background: var(--hp-bg);
  border: 1px solid var(--hp-border);
  border-radius: 20px;
  box-shadow: -4px 4px 32px rgba(26, 58, 92, 0.12);
  z-index: calc(var(--hp-z) + 2);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}
.hplan-panel.is-open {
  transform: translateX(0);
}

/* Panel header */
.hplan-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 2px dashed var(--hp-border);
  flex-shrink: 0;
}
.hplan-panel__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--hp-primary);
  flex: 1;
  letter-spacing: -0.01em;
}
.hplan-panel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 13px;
  background: var(--hp-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 0 7px;
}
.hplan-panel__close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--hp-border);
  background: transparent;
  color: var(--hp-text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.hplan-panel__close:hover { background: var(--hp-primary); color: #fff; border-color: var(--hp-primary); }
.hplan-panel__close svg { width: 16px; height: 16px; }

/* Panel body (list) */
.hplan-panel__body {
  flex: 1;
  min-height: 0;
  max-height: calc(60dvh - 140px);
  overflow-y: auto;
  padding: 12px 16px 12px;
  display: block;
}



/* Panel item */
.hplan-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--hp-border);
  background: #fff;
  margin-bottom: 10px;
  animation: hplan-fadeIn 0.25s ease both;
}

@keyframes hplan-fadeIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.hplan-item__img {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0f0f0;
}
.hplan-item__img--fallback {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: var(--hp-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--hp-primary);
}
.hplan-item__img--fallback svg { width: 22px; height: 22px; }
.hplan-item__info { flex: 1; min-width: 0; }
.hplan-item__category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(122, 162, 214);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hplan-item__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--hp-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hplan-item__remove {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--hp-border);
  background: transparent;
  color: #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.hplan-item__remove:hover { color: #d32f2f; border-color: #f5c0c0; background: #fff5f5; }
.hplan-item__remove svg { width: 14px; height: 14px; }

/* Panel footer */
.hplan-panel__footer {
  padding: 14px 16px;
  border-top: 1.5px dashed var(--hp-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hplan-btn-clear {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1.5px solid #f5c0c0;
  background: transparent;
  color: #d32f2f;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.hplan-btn-clear:hover { background: #fff5f5; }
.hplan-btn-clear svg { width: 15px; height: 15px; }
.hplan-btn-primary {
  flex: 1;
  padding: 10px 18px;
  border: none;
  background: var(--hp-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
  font-family: inherit;
}
.hplan-btn-primary:hover { background: #122f53; transform: translateY(-1px); }

/* Empty state */
.hplan-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
  color: var(--hp-text-soft);
}
.hplan-empty__icon { color: var(--hp-primary); opacity: 0.2; }
.hplan-empty__icon svg { width: 48px; height: 48px; }
.hplan-empty__title { font-size: 16px; font-weight: 700; color: var(--hp-primary); }
.hplan-empty__text { font-size: 13px; max-width: 260px; line-height: 1.6; }

/* Confirm dialog overlay (inside panel) */
.hplan-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.hplan-confirm-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.hplan-confirm {
  background: #fff;
  border: 1.5px solid var(--hp-border);
  border-radius: 16px;
  padding: 28px 24px 20px;
  box-shadow: 0 8px 32px rgba(26, 58, 92, 0.15);
  text-align: center;
  max-width: 280px;
  width: 100%;
}
.hplan-confirm__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--hp-primary);
  margin-bottom: 6px;
}
.hplan-confirm__text {
  font-size: 13px;
  color: var(--hp-text-soft);
  line-height: 1.5;
  margin-bottom: 20px;
}
.hplan-confirm__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.hplan-confirm__cancel,
.hplan-confirm__ok {
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  border: 1.5px solid var(--hp-border);
}
.hplan-confirm__cancel {
  background: transparent;
  color: var(--hp-text-soft);
}
.hplan-confirm__cancel:hover {
  background: #f5f5f5;
  color: var(--hp-primary);
}
.hplan-confirm__ok {
  background: #d32f2f;
  color: #fff;
  border-color: #d32f2f;
}
.hplan-confirm__ok:hover {
  background: #b71c1c;
  border-color: #b71c1c;
}

/* =========================================================
   Generate Plan States (loader / success / error)
   ========================================================= */
.hplan-gen-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 24px;
  text-align: center;
}

.hplan-gen-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(24, 60, 105, 0.12);
  border-top-color: var(--hp-primary);
  border-radius: 50%;
  animation: hplan-spin 0.8s linear infinite;
}

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

.hplan-gen-text {
  font-size: 14px;
  color: var(--hp-text-soft);
  font-weight: 600;
}

.hplan-gen-check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hplan-popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hplan-gen-check svg {
  width: 26px;
  height: 26px;
}

@keyframes hplan-popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.hplan-gen-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--hp-primary);
}

.hplan-gen-subtitle {
  font-size: 13px;
  color: var(--hp-text-soft);
  margin-bottom: 4px;
}

.hplan-gen-view-btn {
  margin-top: 8px;
  text-decoration: none;
  padding: 12px 28px;
  font-size: 14px;
}

.hplan-gen-url {
  font-size: 11px;
  color: var(--hp-text-soft);
  word-break: break-all;
  max-width: 90%;
  margin-top: 4px;
  opacity: 0.6;
}

.hplan-gen-cancel {
  margin-top: 4px;
  border-color: transparent;
  color: var(--hp-text-soft);
}
.hplan-gen-cancel:hover {
  border-color: var(--hp-border);
  background: #f9f9f9;
  color: var(--hp-text);
}
