/**
 * HappyPreggie — Base Reset, Typography, Responsive Grid & Core Utilities
 */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--hp-font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--hp-text-secondary);
  background-color: var(--hp-bg-white);
  overflow-x: hidden;
}

@media (max-width: 991px) {
  body {
    padding-bottom: calc(var(--hp-mobile-bottom-height, 62px) + env(safe-area-inset-bottom, 0px));
  }
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: var(--hp-font-sans);
  color: var(--hp-text-primary);
  text-wrap: balance;
}

h1 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.25;
}

h2 {
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 800;
  line-height: 1.3;
}

h3 {
  font-size: clamp(17px, 1.8vw, 20px);
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--hp-purple-primary);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

a:hover {
  color: var(--hp-purple-secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container & Grid */
.hp-container {
  width: 100%;
  max-width: var(--hp-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

.hp-section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.hp-section-light {
  background-color: var(--hp-bg-light);
}

.hp-section-pink {
  background-color: var(--hp-pink-surface);
}

.hp-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hp-section-header h2 {
  margin-bottom: 4px;
}

.hp-section-subtitle {
  color: var(--hp-text-muted);
  font-size: 15px;
  margin: 0;
}

.hp-section-link {
  font-weight: 700;
  font-size: 14px;
  color: var(--hp-purple-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.hp-section-link:hover {
  color: var(--hp-purple-dark);
  transform: translateX(2px);
}

/* Buttons */
.btn,
.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--hp-font-sans);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  padding: 11px 22px;
  border-radius: var(--hp-radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
}

.btn-purple,
.hp-btn--primary {
  background-color: var(--hp-purple-primary);
  color: #ffffff !important;
  border-color: var(--hp-purple-primary);
}

.btn-purple:hover,
.hp-btn--primary:hover {
  background-color: var(--hp-purple-secondary);
  border-color: var(--hp-purple-secondary);
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(97, 46, 149, 0.28);
}

.btn-outline-purple,
.hp-btn--outline {
  background-color: transparent;
  color: var(--hp-purple-primary);
  border-color: var(--hp-purple-primary);
}

.btn-outline-purple:hover,
.hp-btn--outline:hover {
  background-color: var(--hp-purple-tint);
  color: var(--hp-purple-dark);
}

.btn-teal {
  background-color: var(--hp-teal-accent);
  color: #ffffff !important;
  border-color: var(--hp-teal-accent);
}

.btn-teal:hover {
  background-color: #089188;
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff !important;
  border-color: #25d366;
}

.btn-whatsapp:hover {
  background-color: #1ebc57;
}

.btn-xs,
.hp-btn--xs {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-sm,
.hp-btn--sm {
  padding: 8px 15px;
  font-size: 13px;
}

.btn-lg,
.hp-btn--lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-block,
.hp-btn--block {
  width: 100%;
}

/* Breadcrumbs */
.hp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--hp-text-muted);
  margin-bottom: 16px;
  padding: 0;
  list-style: none;
}

.hp-breadcrumb li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--hp-border-input);
}

.hp-breadcrumb a {
  color: var(--hp-text-muted);
  font-weight: 600;
}

.hp-breadcrumb a:hover {
  color: var(--hp-purple-primary);
}

.hp-breadcrumb .active {
  color: var(--hp-purple-primary);
  font-weight: 700;
}

/* Form Controls & Standard Inputs */
.hp-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
  width: 100%;
}

.hp-form-row,
.hp-form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  margin-bottom: 20px;
}

.hp-form-row .hp-form-group,
.hp-form-row-2 .hp-form-group {
  margin-bottom: 0;
}

.hp-form-label,
.hp-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.hp-form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  width: 100%;
}

.hp-form-req {
  color: #ef4444;
  font-weight: 800;
  font-size: 13px;
  margin-left: 2px;
}

.hp-form-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin-top: 5px;
  font-weight: 400;
  display: block;
}

.hp-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.hp-input-prefix-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
  width: 18px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
  transition: color 0.2s ease;
}

.hp-input-wrap:focus-within .hp-input-prefix-icon {
  color: var(--hp-purple-primary);
}

.hp-whatsapp-color {
  color: #25d366 !important;
}

.hp-input,
.hp-select,
.hp-textarea,
.hp-form-control {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--hp-font-sans);
  font-size: 14px;
  color: var(--hp-text-primary, #0f172a);
  background-color: #ffffff;
  border: 1.5px solid var(--hp-border-strong, #cbd5e1);
  border-radius: 10px;
  padding: 11px 14px;
  min-height: 46px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.hp-form-control--with-icon,
.hp-input--with-icon,
.hp-input-wrap .hp-form-control,
.hp-input-wrap .hp-input,
.hp-input-wrap input {
  padding-left: 44px !important;
}

.hp-password-wrap .hp-form-control,
.hp-password-wrap .hp-input,
.hp-password-wrap input {
  padding-right: 44px !important;
}

.hp-input-wrap.hp-password-wrap .hp-form-control,
.hp-input-wrap.hp-password-wrap .hp-input,
.hp-input-wrap.hp-password-wrap input {
  padding-left: 44px !important;
  padding-right: 44px !important;
}

/* Date inputs: Ensure intrinsic width never overflows containers, especially in mobile modals */
input[type="date"].hp-form-control,
input[type="date"].hp-input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 11px 14px;
}

.hp-input-wrap input[type="date"].hp-form-control,
.hp-input-wrap input[type="date"].hp-input {
  padding-left: 44px !important;
}

.hp-input:hover,
.hp-select:hover,
.hp-textarea:hover,
.hp-form-control:hover,
input.hp-form-control:hover,
select.hp-form-control:hover,
textarea.hp-form-control:hover {
  border-color: #94a3b8;
}

.hp-input:focus,
.hp-select:focus,
.hp-textarea:focus,
.hp-form-control:focus,
input.hp-form-control:focus,
select.hp-form-control:focus,
textarea.hp-form-control:focus {
  outline: none;
  border-color: var(--hp-purple-primary);
  box-shadow: 0 0 0 3.5px rgba(97, 46, 149, 0.16);
  background-color: #fdfcff;
}

.hp-input:user-invalid,
.hp-form-control:user-invalid,
.hp-form-control.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

select.hp-form-control,
select.hp-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  padding-right: 40px;
  cursor: pointer;
}

textarea.hp-form-control,
textarea.hp-textarea {
  min-height: 110px;
  line-height: 1.6;
  resize: vertical;
}

.hp-form-error-banner {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin: 10px 0 14px;
}

/* Sideways Throbbing / Breathing Shimmer Skeletons */
@keyframes hpShimmer {
  0% {
    background-position: -800px 0;
  }
  100% {
    background-position: 800px 0;
  }
}

.hp-skeleton {
  background: linear-gradient(90deg, #f3f0f7 20%, #e5def0 45%, #e5def0 55%, #f3f0f7 80%);
  background-size: 1600px 100%;
  animation: hpShimmer 1.5s infinite ease-in-out;
  border-radius: var(--hp-radius-md);
}

@media (prefers-reduced-motion: reduce) {
  .hp-skeleton {
    animation-duration: 3s;
  }
}

/* ==========================================================================
   Universal Pagination Component (.hp-pagination)
   ========================================================================== */
.hp-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  user-select: none;
}

.hp-page-btn,
.hp-page-nav-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--hp-radius-pill);
  border: 1px solid var(--hp-border-light);
  background: #ffffff;
  color: var(--hp-text-primary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  line-height: 1;
  text-decoration: none;
}

.hp-page-btn:hover:not(:disabled):not(.active),
.hp-page-nav-btn:hover:not(:disabled) {
  border-color: var(--hp-purple-primary);
  color: var(--hp-purple-primary);
  background-color: #fbf8fd;
}

.hp-page-btn.active {
  background-color: var(--hp-purple-primary);
  border-color: var(--hp-purple-primary);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(138, 43, 226, 0.25);
  cursor: default;
}

.hp-page-nav-btn {
  padding: 0 14px;
  font-weight: 600;
}

.hp-page-nav-btn:disabled,
.hp-page-nav-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: #f8f9fa;
  border-color: var(--hp-border-light);
  color: var(--hp-text-muted);
}

.hp-pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 38px;
  color: var(--hp-text-muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}

@media (max-width: 480px) {
  .hp-pagination {
    gap: 4px;
  }

  .hp-page-btn {
    min-width: 32px;
    height: 34px;
    padding: 0 6px;
    font-size: 12px;
  }

  .hp-page-nav-btn {
    height: 34px;
    padding: 0 8px;
    font-size: 12px;
  }

  .hp-pagination-ellipsis {
    width: 16px;
    height: 34px;
    font-size: 12px;
    letter-spacing: 1px;
  }
}

