/* Simulador "Probalo en tu pared" (solo indexImagen.php) */
.btn-photo {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--accent); border-radius: 16px;
  padding: 13px 16px; margin: 14px 0 4px; box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn-photo .ph-ico {
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
}
.btn-photo .ph-ico svg { width: 22px; height: 22px; }
.btn-photo b { display: block; font-size: 15.5px; }
.btn-photo small { display: block; font-size: 12.5px; color: var(--ink-2); }

.ph {
  position: fixed; inset: 0; z-index: 100; background: #0b0f17; color: #f1f5f9;
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ph[hidden], .ph [hidden] { display: none !important; }
.ph-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top, 0px)); }
.ph-top b { flex: 1; font-size: 16px; }
.ph-icon {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(255,255,255,.1);
  color: #fff; font-size: 18px; display: grid; place-items: center;
}
.ph-link { color: #5eead4; font-weight: 700; font-size: 14px; position: relative; cursor: pointer; }
.ph-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.ph-empty { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: safe center; padding: 24px; text-align: center; gap: 12px; }
.ph-empty .big { width: 76px; height: 76px; margin: 0 auto 6px; border-radius: 24px; background: rgba(94,234,212,.12); display: grid; place-items: center; color: #5eead4; }
.ph-empty .big svg { width: 38px; height: 38px; }
.ph-empty h3 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.ph-empty p { margin: 0 0 10px; color: #94a3b8; font-size: 14px; }

.ph-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; position: relative;
  border: 0; border-radius: 14px; padding: 15px 18px; font-size: 15px; font-weight: 700;
  background: rgba(255,255,255,.1); color: #fff; cursor: pointer; flex: 1;
}
.ph-btn.primary { background: #2dd4bf; color: #042f2e; }

.ph-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; }
.ph-stage canvas { touch-action: none; display: block; border-radius: 6px; }
.ph-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: rgba(15,23,42,.8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: 9px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: opacity .4s; pointer-events: none; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis;
}
.ph-hint.off { opacity: 0; }

.ph-controls { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; background: #111827; border-top: 1px solid rgba(255,255,255,.08); }
.ph-range { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; color: #cbd5e1; }
.ph-range > span { width: 74px; flex: none; }
.ph-deg { display: block; font-style: normal; font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; }
.ph-range input { flex: 1; accent-color: #2dd4bf; height: 28px; }
.ph-range button { border: 0; background: rgba(255,255,255,.1); color: #fff; border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: 12px; }
.ph-actions { display: flex; gap: 10px; margin-top: 2px; }
.ph-note { font-size: 12px; color: #94a3b8; text-align: center; margin: 0; }
.ph-warn {
  margin: 0 12px 8px; padding: 10px 12px; border-radius: 12px;
  background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.45); color: #fde68a;
  font-size: 12.5px; line-height: 1.4;
}
.ph-warn b { color: #fcd34d; }
.ph-warn-inline { color: #fcd34d !important; font-weight: 600; font-size: 13px !important; }
.ph-range .ph-straight {
  display: flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px;
  background: rgba(255,255,255,.08); color: #94a3b8; border: 1px solid rgba(255,255,255,.12);
  transition: background .25s, color .25s, box-shadow .25s, border-color .25s;
}
.ph-straight i {
  width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  font-size: 11px; border: 1.5px solid currentColor; color: transparent; transition: .25s;
}
.ph-range .ph-straight.on {
  background: rgba(45,212,191,.18); color: #5eead4; border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45,212,191,.18), 0 0 18px rgba(45,212,191,.55);
}
.ph-straight.on i { background: #2dd4bf; border-color: #2dd4bf; color: #042f2e; }

/* Instrucciones para una foto a escala */
.ph-tips {
  margin: 0 auto 6px; padding: 12px 14px 12px 34px; max-width: 420px; text-align: left;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 14px;
  color: #cbd5e1; font-size: 14px; line-height: 1.45;
}
.ph-tips li + li { margin-top: 6px; }
.ph-tips li::marker { color: #5eead4; font-weight: 800; }
.ph-tips b { color: #fff; }
.ph-empty p.ph-small { font-size: 12.5px; color: #64748b; max-width: 420px; margin: 0 auto 6px; }

/* Escala: distancia + ajuste */
.ph-scale { display: flex; align-items: center; gap: 10px; }
.ph-scale-txt { flex: 1; min-width: 0; font-size: 13px; color: #cbd5e1; }
.ph-scale-txt b { display: block; }
.ph-scale-txt small { display: block; font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-scale select {
  background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px; padding: 7px 8px; font: inherit; font-size: 13px; font-weight: 700;
}
.ph-scale select option { color: #0f172a; }
.ph-cal-btn {
  border: 1px solid #2dd4bf; background: transparent; color: #5eead4; border-radius: 10px;
  padding: 7px 11px; font-weight: 700; font-size: 13px;
}

/* Panel de calibración */
.ph-cal { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; background: #111827; border-top: 1px solid rgba(255,255,255,.08); }
.ph-cal p { margin: 0; font-size: 13px; color: #cbd5e1; line-height: 1.4; }
.ph-cal p b { color: #fff; }
.ph-cal-row { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; color: #cbd5e1; }
.ph-cal-field { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border-radius: 10px; padding: 0 12px; flex: 1; }
.ph-cal-field input { flex: 1; min-width: 0; background: transparent; border: 0; color: #fff; font: inherit; font-size: 16px; padding: 10px 0; outline: none; }
.ph-cal-field em { font-style: normal; color: #94a3b8; }
.ph-cal-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ph-cal-chips button { border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #e2e8f0; border-radius: 99px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; }
