/* ===================================
   PROFILE PAGE (Bento Layout)
   Cards align with APP look (reuses .abs-auth-card styles)
   =================================== */

.abs-profile { margin: 1.5rem auto; padding: 0 0.5rem; }

/* Sticky top navigation inside profile */
.abs-profile-nav { position: sticky; top: 56px; z-index: 10; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 6px 16px rgba(0,0,0,0.06); padding: 0.5rem 0.75rem; margin-bottom: 0.75rem; }
.abs-profile-nav ul { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0; align-items: center; flex-wrap: wrap; }
.abs-profile-nav .abs-nav-link { display: inline-flex; align-items: center; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: #374151; border: 1px solid transparent; transition: all 0.15s ease; font-weight: 600; }
.abs-profile-nav .abs-nav-link:hover { background: #f9fafb; border-color: #e5e7eb; }
.abs-profile-nav .abs-nav-link.is-active { color: #1f2937; background: #eef2ff; border-color: #c7d2fe; }
.abs-profile-nav .abs-nav-cta { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff !important; border-color: transparent; }
.abs-profile-nav .abs-nav-cta:hover { filter: brightness(1.05); }

/* Invisible anchors for in-page navigation (extra safety beyond JS offset) */
.abs-section-anchor { display: block; position: relative; top: -72px; visibility: hidden; }

.abs-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .abs-profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .abs-profile-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    border: none;
    border-radius: 0;
    overflow: visible;
  }
  #abs-card-next, #abs-card-upcoming { grid-column: auto; }
}

.abs-profile-card h3 {
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: #111827;
}

/* Lists */
.abs-profile-list { list-style: none; margin: 0; padding: 0; }
.abs-profile-list li { padding: 0.5rem 0; border-bottom: 1px solid #e5e7eb; display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: center; }
.abs-profile-list li:last-child { border-bottom: none; }

.abs-booking-meta { color: #6b7280; font-size: 0.9rem; }
.abs-booking-actions { display: inline-flex; gap: 0.5rem; flex-direction: column;}

/* Inline form layouts */
.abs-inline-form { display: grid; gap: 0.5rem; }
.abs-inline-2cols { grid-template-columns: 1fr 1fr; }

@media (max-width: 480px) {
  .abs-inline-2cols { grid-template-columns: 1fr; }
}

/* Action buttons (reuse .abs-btn) */
.abs-btn-linklike { background: transparent; color: #4f46e5; text-decoration: underline; border: none; padding: 0; }
.abs-btn-linklike:hover { color: #4338ca; }

.abs-muted { color: #6b7280; }
.abs-note { font-size: 0.9rem; color: #6b7280; margin-top: 0.25rem; }

/* Tooltip icon and bubble */
.abs-tooltip { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 999px; background: #e5e7eb; color: #374151; font-size: 11px; font-weight: 700; cursor: help; margin-left: 6px; position: relative; }
.abs-tooltip::after { content: attr(data-tooltip); position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 8px); white-space: nowrap; background: #111827; color: #fff; padding: 6px 8px; border-radius: 6px; font-size: 12px; line-height: 1.2; opacity: 0; pointer-events: none; transition: opacity 120ms ease; box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.abs-tooltip::before { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 100%; border: 6px solid transparent; border-top-color: #111827; opacity: 0; transition: opacity 120ms ease; }
.abs-tooltip:hover::after, .abs-tooltip:hover::before { opacity: 1; }

/* Highlight for next appointment */
#abs-card-next { border-left: 4px solid #22c55e; }

/* Ticket style for next booking */
.abs-ticket { position: relative; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.abs-ticket-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.abs-ticket-body { padding: 14px 16px; }
.abs-ticket-meta { color: #6b7280; font-size: 0.95rem; margin-top: 4px; }
.abs-ticket-divider { height: 12px; background: repeating-linear-gradient(90deg, #f3f4f6 0, #f3f4f6 8px, transparent 8px, transparent 16px); position: relative; }
.abs-ticket-divider::before, .abs-ticket-divider::after { content: ""; position: absolute; top: -6px; width: 12px; height: 12px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 999px; }
.abs-ticket-divider::before { left: -6px; }
.abs-ticket-divider::after { right: -6px; }
.abs-ticket-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Button color variants */
.abs-btn.abs-btn-danger { background: #ef4444; color: #fff; }
.abs-btn.abs-btn-danger:hover { background: #dc2626; }
.abs-btn.abs-btn-success { background: #22c55e; color: #fff; }
.abs-btn.abs-btn-success:hover { background: #16a34a; }

/* Counters row */
.abs-counters { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.abs-counter { padding: 6px 10px; border-radius: 8px; background: #f3f4f6; color: #111827; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* Dropdown (for calendar options) */
.abs-dropdown { position: relative; display: inline-block; }
.abs-dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); padding: 6px 0; display: none; z-index: 100; }
.abs-dropdown-menu.open { display: block; }
.abs-dropdown-item { display: block; padding: 8px 12px; color: #111827; text-decoration: none; }
.abs-dropdown-item:hover { background: #f9fafb; }

/* Message */
.abs-profile-message { margin-bottom: 0.75rem; padding: 0.75rem 1rem; border-radius: 8px; font-weight: 500; }
.abs-profile-message.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.abs-profile-message.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Desktop: unir visualmente cards dentro del grid */
@media (min-width: 1024px) {
  .abs-profile-grid .abs-auth-card {
    margin: 0;
    border-radius: 12px;
    border-right: none;
    border-bottom: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  }
}

/* Modal */
.abs-modal { position: fixed; inset: 0; display: none; z-index: 9999; }
.abs-modal.open { display: block; }
.abs-modal-backdrop { position: absolute; inset: 0; background: rgba(17,24,39,0.5); }
.abs-modal-dialog { position: relative; margin: 5vh auto; max-width: 640px; background: #fff; border-radius: var(--abs-radius, 8px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); padding: 0; overflow: hidden; }
.abs-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.abs-modal-title { margin: 0; font-size: 1rem; font-weight: 700; color: #111827; }
.abs-modal-close { background: transparent; border: none; font-size: 20px; line-height: 1; cursor: pointer; color: #6b7280; }
.abs-modal-close:hover { color: #111827; }
.abs-modal-body { padding: 16px; }
.abs-modal-footer { padding: 12px 16px; border-top: 1px solid #e5e7eb; background: #f9fafb; text-align: right; }

/* Slots grid */
.abs-slots-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: start; }
@media (max-width: 480px) {
  .abs-slots-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.abs-slot-btn { width: 100%; }

/* Pagination */
.abs-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.abs-pagination .abs-pager-info { color: #6b7280; font-size: 0.9rem; }

/* Callouts */
.abs-callout { border-radius: 10px; padding: 1rem 1.25rem; border: 1px solid #e5e7eb; background: #ffffff; }
.abs-callout-info { border-color: #bfdbfe; background: #eff6ff; }
.abs-callout-title { font-weight: 700; color: #111827; margin-bottom: 0.25rem; }
.abs-callout-body { color: #374151; margin-bottom: 0.5rem; }
