/* ==============================================================
   PROFILE.CSS — TuEstilo
   Perfil de Usuario (hero, ticket, historial, notif, settings)
   Extraído de styles.css (Fase 2 — Refactorización CSS)
   ============================================================== */

.profile-hero-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.profile-hero-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-surface);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  background: var(--color-border);
}

.profile-hero-camera {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-surface);
  border: 2px solid var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.profile-hero-camera:hover {
  background: var(--color-primary-dark);
}

.profile-hero-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.25rem;
}

.profile-hero-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin: 0 0 0.75rem;
}

.profile-hero-edit {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--color-border);
  background: var(--color-surface-subtle);
  color: var(--color-text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.profile-hero-edit:hover {
  background: var(--color-border-light);
  border-color: var(--color-text-disabled);
}

.profile-hero-role {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-light);
}

.profile-hero-role.hidden {
  display: none;
}

.profile-stats {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.profile-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--color-border-light);
}

.profile-stat-icon {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.profile-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-stat-label {
  font-size: 0.7rem;
  color: var(--color-text-light);
  margin-top: 0.15rem;
}

.profile-stat-badge .profile-stat-value {
  font-size: 0.9rem;
}

.profile-section {
  margin-bottom: 1.5rem;
}

.profile-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

.profile-ticket-wrap {
  min-height: 0;
}

.profile-ticket-empty {
  font-size: 0.9rem;
  color: var(--color-text-light);
  text-align: center;
  padding: 1.25rem;
  background: var(--color-surface-subtle);
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
  margin: 0;
}

.profile-ticket {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, #7c3aed 100%);
  color: var(--color-surface);
  padding: 1.25rem 1.25rem 1.5rem;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.profile-ticket-time {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.2rem;
}

.profile-ticket-day {
  font-size: 0.95rem;
  opacity: 0.95;
  margin-bottom: 0.5rem;
}

.profile-ticket-service {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.profile-ticket-place {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.profile-ticket-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.profile-ticket-btn {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.2);
  color: var(--color-surface);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.profile-ticket-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.8);
}

.profile-ticket-btn--danger {
  border-color: rgba(254, 226, 226, 0.8);
  background: rgba(254, 226, 226, 0.25);
}

.profile-ticket-btn--danger:hover {
  background: rgba(254, 226, 226, 0.4);
}

.profile-historial-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-historial-empty {
  font-size: 0.9rem;
  color: var(--color-text-light);
  padding: 1rem;
  background: var(--color-surface-subtle);
  border-radius: var(--radius-md);
  margin: 0;
}

.profile-historial-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-xs);
}

.profile-historial-item.hidden {
  display: none;
}

.profile-historial-info {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--color-text);
}

.profile-historial-service {
  font-weight: 600;
}

.profile-historial-estado {
  font-size: 0.75rem;
  color: var(--color-success);
  margin-left: 0.25rem;
}

.profile-historial-estado--no {
  color: var(--color-danger);
}

.profile-historial-repetir {
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-xs);
  background: var(--color-primary);
  color: var(--color-surface);
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.profile-historial-repetir:hover {
  background: var(--color-primary-dark);
}

.profile-settings-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--color-border-light);
}

/* =============================================
   NOTIF SETTINGS MODAL – iOS Switch Styles
   ============================================= */

/* Row container */
.notif-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  transition: opacity 0.2s;
}

.notif-switch-row--master {
  padding-bottom: 0.65rem;
}

.notif-switch-row.notif-sub-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.notif-switch-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.notif-switch-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
}

.notif-switch-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.1rem;
}

.notif-switch-desc {
  font-size: 0.72rem;
  color: var(--color-text-placeholder);
  margin: 0;
}

.notif-switch-divider {
  height: 1px;
  background: var(--color-border-light);
  margin: 0.15rem 0;
}

/* iOS-style toggle */
.notif-ios-switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  flex-shrink: 0;
  cursor: pointer;
}

.notif-ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.notif-ios-slider {
  position: absolute;
  inset: 0;
  background: var(--color-text-disabled);
  border-radius: 31px;
  transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-ios-slider::before {
  content: '';
  position: absolute;
  height: 25px;
  width: 25px;
  left: 3px;
  bottom: 3px;
  background: var(--color-surface);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-ios-switch input:checked+.notif-ios-slider {
  background: linear-gradient(135deg, var(--color-primary), #4f46e5);
}

.notif-ios-switch input:checked+.notif-ios-slider::before {
  transform: translateX(20px);
}

.notif-ios-switch:focus-within .notif-ios-slider {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}


.profile-settings-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.2s;
}

.profile-settings-item:last-child {
  border-bottom: none;
}

.profile-settings-item:hover {
  background: var(--color-surface-subtle);
}

.profile-settings-item--logout {
  color: var(--color-danger);
  font-weight: 600;
}

.profile-settings-item--logout:hover {
  background: var(--color-danger-bg-light);
}

.profile-settings-icon {
  font-size: 1.1rem;
}

.profile-settings-item span:not(.profile-settings-icon):not(.profile-settings-chevron) {
  flex: 1;
}

.profile-settings-chevron {
  color: var(--color-text-placeholder);
  font-size: 1.1rem;
}

/* Modal Editar Perfil */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}

.profile-modal:not(.hidden) {
  pointer-events: auto;
}

.profile-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.25s;
}

.profile-modal:not(.hidden) .profile-modal-backdrop {
  opacity: 1;
}

.profile-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: var(--color-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.profile-modal:not(.hidden) .profile-modal-content {
  transform: translateY(0);
}

.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-light);
}

.profile-modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  color: var(--color-text-light);
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: background 0.2s, color 0.2s;
}

.profile-modal-close:hover {
  background: var(--color-border-light);
  color: var(--color-text);
}

.profile-modal-body {
  padding: 1.25rem 1.25rem 2rem;
  overflow-y: auto;
}

/* Gestión de Reservas: Agenda Timeline (tabs + sticky headers + tarjetas) */
.reservas-tabs {
  display: flex;
  gap: 0;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-xs);
  width: fit-content;
}

.reservas-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #64748b;
  border-radius: var(--radius-2xs);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.reservas-tab:hover {
  color: #334155;
}

.reservas-tab--active {
  background: var(--color-surface);
  color: #1e293b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.reservas-timeline-list {
  padding: 0 0 1rem;
  list-style: none;
}

.reservas-timeline-header {
  padding: 0.5rem 1rem 0.5rem 12px;
  margin: 0 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  border-radius: 0;
}

.sticky-date-header {
  border-bottom: 1px solid #eee;
}

/* Barra de fecha fija (reemplazo del sticky): siempre visible arriba al hacer scroll */
