/* Foto de perfil (ver photo.js): hoja para elegirla, pantalla de recorte en círculo y el círculo con la foto. */

/* Hoja: tres opciones grandes, fáciles de tocar */
.ph-options { display: grid; gap: 8px; margin-top: 6px; }
.ph-option {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--r-md, 14px); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 16px; font-weight: 700; text-align: left; cursor: pointer;
}
.ph-option svg { width: 24px; height: 24px; flex: none; color: var(--brand-text, var(--brand)); }
.ph-option:active { transform: scale(.99); }
.ph-option.ph-danger, .ph-option.ph-danger svg { color: var(--danger); }
.ph-rules { margin: 0 0 4px; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Recorte: pantalla completa, siempre oscura (como el editor de fotos del celular) */
.ph-crop {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: #0b0b0c; color: #fff; animation: ph-fade .18s ease-out;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.ph-crop-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 8px; }
.ph-crop-top strong { font-size: 16px; }
.ph-link, .ph-link-spacer { min-width: 92px; }
.ph-link {
  min-height: 44px; padding: 0 12px; border: 0; background: none; color: #fff; font: inherit; font-size: 16px; font-weight: 600;
  text-align: left; cursor: pointer;
}
.ph-stage {
  position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  width: min(100vw - 32px, 100dvh - 260px, 520px); aspect-ratio: 1; margin: auto; flex: none; outline: none;
}
.ph-stage:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring, #fff); }
.ph-img {
  position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: center;
  pointer-events: none; will-change: transform;
}
/* Fuera del círculo, oscuro; el borde blanco marca lo que queda */
.ph-mask {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 100vmax rgb(0 0 0 / .62), inset 0 0 0 2px rgb(255 255 255 / .9);
}
.ph-crop-bottom { display: grid; gap: 14px; width: min(100%, 520px); margin: 0 auto; padding: 12px 16px 16px; }
.ph-zoom { display: flex; align-items: center; gap: 12px; color: rgb(255 255 255 / .8); }
.ph-zoom svg { width: 18px; height: 18px; flex: none; }
.ph-zoom input { flex: 1; accent-color: var(--brand); min-height: 32px; }
@keyframes ph-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ph-crop { animation: none; } .ph-option:active { transform: none; } }

/* Círculo con la foto (o la inicial): Mi cuenta, arriba en el inicio, reseñas, Tati */
.ph-avatar { overflow: hidden; }
.ph-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* Botón de Mi cuenta: el círculo con una camarita para cambiarla */
.ph-edit { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.ph-edit .ph-badge {
  position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgb(0 0 0 / .25);
}
.ph-edit .ph-badge svg { width: 15px; height: 15px; }
.ph-edit[aria-busy="true"] .avatar { opacity: .5; }
.ph-edit .avatar { border-radius: 50%; }
/* Reseñas: la foto pequeña del cliente junto a su nombre */
.st-review-who { display: inline-flex; align-items: center; gap: 8px; }
.st-review-face {
  display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 800;
}
h3.st-review-who .st-review-face { width: 36px; height: 36px; font-size: 16px; }
/* "Quiero ser Tati": la foto junto a cómo debe ser */
.ap-photo { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.ap-photo p { margin: 0; }
.ap-photo .avatar { width: 72px; height: 72px; }
.ap-photo .avatar svg { width: 30px; height: 30px; }

/* Mi cuenta: "Mostrar mi foto al Tati que me entrega" */
.st-toggle-row { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.st-toggle-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-toggle-row .switch, .nt-row .switch { position: relative; display: inline-flex; flex: none; width: 52px; height: 32px; cursor: pointer; }
.st-toggle-row .switch input, .nt-row .switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.st-toggle-row .switch .track, .nt-row .switch .track { pointer-events: none; width: 100%; height: 100%; border-radius: 999px; background: var(--line-strong); transition: background .15s; }
.st-toggle-row .switch .track::after, .nt-row .switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .3); transition: transform .15s;
}
.st-toggle-row .switch input:checked + .track, .nt-row .switch input:checked + .track { background: var(--ok-dot); }
.st-toggle-row .switch input:checked + .track::after, .nt-row .switch input:checked + .track::after { transform: translateX(20px); }
.st-toggle-row .switch input:focus-visible + .track, .nt-row .switch input:focus-visible + .track { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.st-toggle-row .switch input:disabled + .track, .nt-row .switch input:disabled + .track { opacity: .5; }
@media (prefers-reduced-motion: reduce) {
  .st-toggle-row .switch .track, .st-toggle-row .switch .track::after, .nt-row .switch .track, .nt-row .switch .track::after { transition: none; }
}
