/* January Mascotas — Clientes Section
   Inherits: Quicksand font, #4a1a7a, #7b52ab, #7B52AB from parent style.css
   All new components are namespaced under .jp-* to avoid conflicts.
*/

/* ── Reset / base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

.jp-page {
  min-height: 100vh;
  background: var(--jp-surface-warm);
  font-family: 'Quicksand', sans-serif;
  color: #444;
  display: flex;
  flex-direction: column;
}

/* ── Header ───────────────────────────────────────────────────────────── */
.jp-header {
  background: var(--jp-header-bg);
  border-bottom: 2px solid var(--jp-header-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
}
.jp-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #4a1a7a;
  font-size: 1.1rem;
  font-weight: 700;
  position: relative;
  z-index: 50;
  overflow: visible;
}
.jp-header .logo img { height: 227px; width: auto; max-width: none; background:transparent; position:relative; z-index:60; margin:-18px 0 -157px 0; }
.jp-header nav { display: flex; align-items: center; gap: 8px; }
.jp-header nav a {
  color: #4a1a7a;
  font-weight: 600;
  font-size: calc(0.95rem + 2px);
  text-decoration: none;
  transition: color 0.2s;
}
.jp-header nav a:hover { color: #4A1A7A; }

/* ── Main content wrapper ─────────────────────────────────────────────── */
.jp-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 60px;
}
.jp-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 30px rgba(124, 58, 237, 0.1);
  padding: 40px 36px;
  width: 100%;
  max-width: 480px;
}
.jp-card-wide { max-width: 720px; }
.jp-card-full { max-width: 960px; }

/* ── Headings ─────────────────────────────────────────────────────────── */
.jp-h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #4a1a7a;
  margin: 0 0 6px;
  line-height: 1.2;
}
.jp-subtitle {
  color: #707070;
  font-size: 1rem;
  margin: 0 0 28px;
}

/* ── Step progress indicator ──────────────────────────────────────────── */
.jp-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}
.jp-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}
.jp-step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid #e9d5ff;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #aaa;
  transition: all 0.3s;
}
.jp-step.active .jp-step-dot  { border-color: #7B52AB; background: #7B52AB; color: #fff; }
.jp-step.done   .jp-step-dot  { border-color: #6B42A0; background: #6B42A0; color: #fff; }
.jp-step-label {
  font-size: 0.72rem;
  color: #aaa;
  white-space: nowrap;
}
.jp-step.active .jp-step-label,
.jp-step.done   .jp-step-label { color: #4a1a7a; }
.jp-step-line {
  flex: 1;
  height: 2px;
  background: #e9d5ff;
  min-width: 24px;
  margin: 0 4px;
  margin-bottom: 20px;
  transition: background 0.3s;
}
.jp-step-line.done { background: #7B52AB; }

/* ── Form elements ────────────────────────────────────────────────────── */
.jp-form-group {
  margin-bottom: 18px;
}
.jp-label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: #4a1a7a;
  margin-bottom: 6px;
}
.jp-input,
.jp-select,
.jp-textarea {
  width: 100%;
  padding: 12px 18px;
  border: 2px solid #e9d5ff;
  border-radius: 50px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  color: #333;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.jp-textarea { border-radius: 14px; resize: vertical; min-height: 80px; }
.jp-input:focus,
.jp-select:focus,
.jp-textarea:focus {
  border-color: #4A1A7A;
  box-shadow: 0 0 0 3px rgba(74,26,122,0.20);
}
.jp-input.error, .jp-select.error { border-color: #e53935; }
.jp-field-error {
  color: #e53935;
  font-size: 0.82rem;
  margin-top: 4px;
  padding-left: 10px;
}

/* ── Checkbox / toggle ────────────────────────────────────────────────── */
.jp-check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: #444;
}
.jp-check-label input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: #7B52AB;
  cursor: pointer;
}

/* ── Photo upload ─────────────────────────────────────────────────────── */
.jp-photo-area {
  border: 2px dashed #e9d5ff;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
}
.jp-photo-area:hover,
.jp-photo-area.drag-over { border-color: #7B52AB; background: #f5f0ff; }
.jp-photo-area img.preview,
.jp-photo-area img[id$="-preview"] {
  max-width: 100%;
  max-height: 200px;
  border-radius: 10px;
  margin: 10px auto 0;
  object-fit: cover;
  display: block;
}
.jp-photo-area input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.jp-photo-hint { color: #aaa; font-size: 0.88rem; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.jp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 50px;
  padding: 13px 28px;
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  text-decoration: none;
}
.jp-btn:active { transform: scale(0.97); }
.jp-btn-primary {
  background: #7B52AB;
  color: #fff;
  width: 100%;
  margin-top: 8px;
}
.jp-btn-primary:hover { background: #6B42A0; }
.jp-btn-pink {
  background: #7B52AB;
  color: #fff;
}
.jp-btn-pink:hover { background: #6B42A0; }
.jp-btn-outline {
  background: transparent;
  border: 2px solid #e9d5ff;
  color: #4a1a7a;
}
.jp-btn-outline:hover { border-color: #7B52AB; }
.jp-btn-ghost {
  background: var(--jp-btn-ghost-bg);
  color: #4a1a7a;
  padding: 8px 16px;
  font-size: 0.9rem;
}
.jp-btn-ghost:hover { color: #7B52AB; }
.jp-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.jp-btn-sm { padding: 8px 18px; font-size: 0.88rem; }

/* ── Divider ──────────────────────────────────────────────────────────── */
.jp-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0;
  color: #bbb; font-size: 0.85rem;
}
.jp-divider::before,
.jp-divider::after { content: ''; flex: 1; height: 1px; background: #f3ecfb; }

/* ── Alert / notification ─────────────────────────────────────────────── */
.jp-alert {
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  font-weight: 600;
}
.jp-alert-error   { background: #ffeaea; color: #c62828; }
.jp-alert-success { background: #e8f5e9; color: #2e7d32; }
.jp-alert-info    { background: #f3ecfb; color: #6d28d9; }

/* ── Dashboard grid ───────────────────────────────────────────────────── */
.jp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
/*
 * ── Dog profile card — ui-ux-pro-max redesign ──────────────────────────
 * Style: Claymorphism + warm purple palette from the parasite modal.
 * Tokens: #FAF5FF base, #4A1A7A/#7B52AB purples, lavender gradients.
 * ───────────────────────────────────────────────────────────────────── */
.jp-dog-card {
  background: #FAF5FF;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(196,168,240,0.35),
    0 6px 24px rgba(74,26,122,0.13),
    0 2px 6px rgba(74,26,122,0.07);
  transition: box-shadow 0.22s, transform 0.22s;
}
.jp-dog-card:hover {
  box-shadow:
    0 0 0 1.5px rgba(123,82,171,0.5),
    0 12px 36px rgba(74,26,122,0.2),
    0 3px 10px rgba(74,26,122,0.1);
  transform: translateY(-2px);
}

/* Header strip — purple gradient matching modal header */
.jp-dog-card-header {
  background: linear-gradient(135deg, #4A1A7A 0%, #7B52AB 60%, #9B72C8 100%);
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

/* Glow orb in header */
.jp-dog-card-header::before {
  content: '';
  position: absolute;
  top: -16px; right: -16px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,255,0.3) 0%, transparent 65%);
  pointer-events: none;
}

/* Photo — circular, cream bg, matching modal logo treatment */
.jp-dog-photo {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F7F3ED, #EDE9FF);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.65rem;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow:
    0 0 0 2px rgba(201,168,255,0.4),
    0 3px 12px rgba(0,0,0,0.25);
}
.jp-dog-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Name + breed in header */
.jp-dog-card-title {
  flex: 1;
  min-width: 0;
}
.jp-dog-card-name {
  font-family: 'Quicksand', sans-serif;
  font-weight: 800;
  font-size: 1.08rem;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jp-dog-card-breed {
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Body — lavender gradient matching modal body */
.jp-dog-card-body {
  background: linear-gradient(180deg, #F0EAFF 0%, #FAF5FF 100%);
  padding: 13px 18px 14px;
}

/* Chip row — size + vaccinated */
.jp-dog-card-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.jp-dog-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 99px;
}
.jp-dog-chip-size {
  background: linear-gradient(135deg, #EDE9FF, #E4D9FF);
  border: 1px solid #C4A8F0;
  color: #4A1A7A;
}
.jp-dog-chip-vax {
  background: linear-gradient(135deg, #dcfce7, #d1fae5);
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.jp-dog-chip-novax {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
  color: #78350f;
}

/* Attribute rows — matching modal tip box style */
.jp-dog-card-attrs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.8rem;
  margin-bottom: 10px;
}
.jp-dog-card-attr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  border-bottom: 1px solid rgba(196,168,240,0.2);
}
.jp-dog-card-attr:last-child { border-bottom: none; }
.jp-dog-card-attr-label { color: #9b7ebd; font-weight: 500; }
.jp-dog-card-attr-val   { color: #2d0a4e; font-weight: 700; text-align: right; }

/* Notes box — left-border accent matching modal .pm-sub */
.jp-dog-card-notes {
  background: linear-gradient(135deg, #EDE9FF 0%, #F5F0FF 100%);
  border: 1px solid #D4BBFF;
  border-left: 3px solid #7B52AB;
  border-radius: 0 8px 8px 0;
  padding: 7px 10px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.75rem;
  font-style: italic;
  color: #5a2d82;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Parasite warning — warm red pill */
.jp-dog-card-parasite {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 10px;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7f1d1d;
}
.jp-dog-card-parasite svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Actions — matching modal buttons exactly */
.jp-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
  padding: 0 18px 14px;
  background: #FAF5FF;
}

/* Edit button — modal .pm-btn-edit style */
.jp-card-actions .btn-edit {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, #4A1A7A, #7B52AB) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 9px 16px !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 3px 12px rgba(74,26,122,0.3);
}
.jp-card-actions .btn-edit:hover {
  background: linear-gradient(135deg, #3d1566, #6B42A0) !important;
  box-shadow: 0 5px 16px rgba(74,26,122,0.4);
  transform: translateY(-1px);
}

/* Delete button — modal .pm-btn-close style */
.jp-card-actions .btn-delete {
  flex: 1;
  background: rgba(255,255,255,0.8) !important;
  color: #9b1c1c !important;
  border: 1.5px solid #fca5a5 !important;
  border-radius: 50px !important;
  padding: 9px 16px !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s;
}
.jp-card-actions .btn-delete:hover {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
}

.jp-booking-card {
  background: #FAF5FF;
  border: 1.5px solid rgba(196,168,240,0.35);
  border-radius: 16px;
  padding: 16px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}
.jp-booking-card:hover {
  box-shadow: 0 6px 20px rgba(74,26,122,0.14);
  transform: translateY(-1px);
}

/* ── Status badges ────────────────────────────────────────────────────── */
.jp-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.jp-badge-confirmed  { background: #e8f5e9; color: #2e7d32; }
.jp-badge-pending    { background: #fff8e1; color: #f57f17; }
.jp-badge-cancelled  { background: #ffeaea; color: #c62828; }
.jp-badge-completed  { background: #f3ecfb; color: #6d28d9; }
.jp-badge-no_show    { background: #f3e5f5; color: #6a1b9a; }

/* ── Booking calendar / slot picker ──────────────────────────────────── */
.jp-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}
.jp-cal-day {
  padding: 10px 4px;
  text-align: center;
  border-radius: 10px;
  border: 2px solid #f3ecfb;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.jp-cal-day:hover         { border-color: #7B52AB; color: #7b52ab; }
.jp-cal-day.selected      { background: #7b52ab; border-color: #7B52AB; color: #fff; }
.jp-cal-day.no-slots      { opacity: 0.4; cursor: default; }
.jp-cal-day.today         { border-color: #7B52AB; color: #7B52AB; }

.jp-slots { display: flex; flex-wrap: wrap; gap: 10px; }
.jp-slot-btn {
  padding: 10px 18px;
  border-radius: 50px;
  border: 2px solid #e9d5ff;
  background: #fff;
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #4a1a7a;
  cursor: pointer;
  transition: all 0.2s;
}
.jp-slot-btn:hover    { border-color: #7B52AB; color: #7b52ab; }
.jp-slot-btn.selected { background: #7b52ab; border-color: #7B52AB; color: #fff; }

/* ── Service card ─────────────────────────────────────────────────────── */
.jp-service-cards { display: grid; gap: 12px; }
.jp-service-card {
  border: 2px solid #f3ecfb;
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.jp-service-card:hover    { border-color: #7B52AB; }
.jp-service-card.selected { border-color: #7B52AB; background: #f5f0ff; }
.jp-service-card .price   { font-weight: 700; color: #4A1A7A; font-size: 1.05rem; white-space: nowrap; flex-shrink: 0; margin-left: 12px; }

/* ── Add-ons ──────────────────────────────────────────────────────────── */
.jp-addon-list { display: flex; flex-direction: column; gap: 8px; }
.jp-addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 2px solid #f3ecfb;
  border-radius: 12px;
  transition: border-color 0.2s;
}
.jp-addon-item:has(input:checked) { border-color: #7B52AB; background: #f5f0ff; }

/* ── Summary box ──────────────────────────────────────────────────────── */
.jp-summary {
  background: #f3ecfb;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.jp-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.9rem;
}
.jp-summary-row.total {
  border-top: 2px solid #e6dcf5;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: #4a1a7a;
}

/* ── Loading spinner ──────────────────────────────────────────────────── */
.jp-spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ───────────────────────────────────────────────────────────── */
.jp-footer {
  background: #4A1A7A;
  color: rgba(255,255,255,0.9);
  text-align: center;
  padding: 16px;
  font-size: 0.85rem;
}
.jp-footer a { color: #fff; text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .jp-card       { padding: 28px 20px; border-radius: 16px; }
  .jp-h1         { font-size: 1.4rem; }
  .jp-grid-2     { grid-template-columns: 1fr; }
  .jp-calendar   { grid-template-columns: repeat(4, 1fr); }

  /* ── 2-bar mobile header ─────────────────────────────── */
  /* Row 1 (44px): logo  |  lang button (absolute, right)  */
  /* Row 2 (44px): nav actions, evenly spaced              */
  .jp-header {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0;
    height: auto;
  }
  .jp-header .logo {
    flex: 1;
    height: 44px;
    padding: 0 52px 0 12px; /* right gap keeps logo clear of lang button */
  }
  .jp-header .logo img { height: 122px; background:transparent; position:relative; z-index:60; margin:4px 0 -56px 0; }
  /* Lang button: float to top-right of row 1 */
  .jp-header nav .jp-lang-globe {
    position: absolute;
    top: 0;
    right: 12px;
    height: 44px;
    display: flex !important;
    align-items: center;
    padding: 0 4px;
  }
  /* Row 2: nav bar */
  .jp-header nav {
    width: 100%;
    height: 44px;
    background: var(--jp-header-bg);
    border-top: none;
    justify-content: flex-end;
    align-items: center;
    padding: 0 8px;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  /* Compact text for tight row */
  .jp-header nav a,
  .jp-header nav button:not(.jp-lang-globe) { display:inline-flex; align-items:center; line-height:1;
    font-size: calc(0.76rem + 2px) !important;
    padding: 5px 8px !important;
    white-space: nowrap;
    border-radius: 6px !important;
  }
  /* Hide username greeting (no space on mobile) */
  #username-display { display: none !important; }
}

/* ── Focus visible ────────────────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid #4A1A7A;
  outline-offset: 2px;
}

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Pending badge tooltip ───────────────────────────────────────────── */
.jp-pending-tooltip {
  position: relative;
  cursor: help;
}
.jp-pending-tooltip .jp-tooltip-text {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #333;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
  z-index: 200;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.jp-pending-tooltip .jp-tooltip-text::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 16px;
  border: 6px solid transparent;
  border-bottom-color: #333;
}
.jp-pending-tooltip:hover .jp-tooltip-text { display: block; }

/* ── Password show/hide toggle ───────────────────────────────────────── */
.jp-pwd-wrap { position: relative; }
.jp-pwd-wrap .jp-input { padding-right: 46px; }
.jp-pwd-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #aaa;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.15s;
}
.jp-pwd-toggle:hover,
.jp-pwd-toggle:focus-visible { color: #7B52AB; outline: 2px solid rgba(123,82,171,.3); }
