/* Справки.мед — страница «Фото 3×4» (редактор и печать) */

.foto { display: grid; gap: 28px; }

.foto-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  min-height: 260px; padding: 32px 20px; text-align: center;
  background: var(--white); border: 2px dashed var(--tl-300); border-radius: var(--r-xl);
  transition: border-color .2s, background .2s;
}
.foto-drop.is-over { border-color: var(--tl-600); background: var(--tl-50); }
.foto-drop__ic { width: 56px; height: 56px; border-radius: var(--r-full); display: grid; place-items: center; background: var(--tl-50); color: var(--tl-600); }
.foto-drop__ic svg { width: 28px; height: 28px; }
.foto-drop b { font-size: var(--fs-lg); color: var(--ink-900); }
.foto-drop p { color: var(--ink-500); font-size: var(--fs-sm); max-width: 44ch; }
.foto-drop__btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.has-photo .foto-drop { min-height: 0; padding: 18px; flex-direction: row; flex-wrap: wrap; }
.has-photo .foto-drop__ic, .has-photo .foto-drop p { display: none; }

.foto-editor { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 32px; align-items: start; }
.foto-editor[hidden] { display: none; }

.foto-frame { position: relative; width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-md); background: var(--white); }
.foto-frame canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.foto-frame canvas:active { cursor: grabbing; }
/* разметка: овал лица, линия макушки и подбородка */
.foto-guide { position: absolute; inset: 0; pointer-events: none; }
.foto-guide__oval { position: absolute; left: 22%; right: 22%; top: 12%; bottom: 22%; border: 2px dashed rgba(13,148,136,.85); border-radius: 50%; }
.foto-guide__line { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(245,158,11,.9); }
.foto-guide__line span { position: absolute; right: 6px; top: 2px; font-size: 11px; font-weight: 600; color: #b45309; background: rgba(255,255,255,.85); padding: 0 4px; border-radius: 4px; }
.no-guide .foto-guide { display: none; }
.foto-quick { display: grid; gap: 12px; max-width: 360px; margin: 18px auto 0; }
.foto-quick .foto-hint { margin-top: 0; }
.foto-count { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; color: var(--ink-800); }
.foto-step { display: inline-flex; align-items: center; border: 1px solid var(--ink-200); border-radius: var(--r-full); background: var(--white); overflow: hidden; }
.foto-step button { width: 48px; height: 48px; font-size: 24px; line-height: 1; color: var(--tl-700); background: none; border: 0; cursor: pointer; }
.foto-step button:hover { background: var(--tl-50); }
.foto-step input { width: 52px; height: 48px; border: 0; text-align: center; font: inherit; font-size: var(--fs-lg); font-weight: 700; color: var(--ink-900); background: none; -moz-appearance: textfield; appearance: textfield; }
.foto-step input::-webkit-outer-spin-button, .foto-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.foto-hint { margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-500); text-align: center; }

.foto-panel { display: grid; gap: 22px; }
.foto-card { scroll-margin-top: 100px; }
.foto-card { background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; }
.foto-card h3 { font-size: var(--fs-md); }
.foto-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 12px; font-size: var(--fs-sm); color: var(--ink-700); }
.foto-row input[type=range] { width: 100%; accent-color: var(--tl-600); }
.foto-checks { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--fs-sm); color: var(--ink-700); }
.foto-checks label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.foto-checks input { accent-color: var(--tl-600); width: 18px; height: 18px; }
.foto-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.foto-btns .btn { flex: 1 1 auto; }
.foto-select { display: grid; gap: 12px; }
.foto-select label { display: grid; gap: 6px; font-size: var(--fs-sm); color: var(--ink-600); }
.foto-select select { height: 44px; padding: 0 12px; border: 1px solid var(--ink-200); border-radius: var(--r-sm); background: var(--white); font: inherit; font-size: var(--fs-base); color: var(--ink-900); }
.foto-sheet { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; }
.foto-sheet img { width: 100%; border: 1px solid var(--ink-200); border-radius: 6px; background: var(--white); box-shadow: var(--sh-xs); }
.foto-sheet p { font-size: var(--fs-sm); color: var(--ink-600); }
.foto-note { font-size: var(--fs-xs); color: var(--ink-500); line-height: 1.6; }

#foto-print { display: none; }

@media (max-width: 860px) {
  .foto-editor { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .foto-row { grid-template-columns: 90px minmax(0, 1fr); }
  .foto-select { grid-template-columns: 1fr; }
  .foto-sheet { grid-template-columns: 90px minmax(0, 1fr); }
}

@media print {
  body > *:not(#foto-print) { display: none !important; }
  #foto-print { display: block !important; }
  #foto-print img { display: block; }
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; }
}
