/* Photo upload widget for lead forms.
   Используется в #lead-form на главной и на /kalkulyator/. */

.form__photos { display:block; margin:6px 0 12px; }
.form__photos-label {
  display:block;
  font-weight:500;
  color:inherit;
  margin-bottom:8px;
  font-size:.95em;
}
.form__photos-drop {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:78px;
  margin-top:8px;
  padding:14px 18px;
  border:2px dashed rgba(255,255,255,.28);
  border-radius:12px;
  background:rgba(255,255,255,.04);
  cursor:pointer;
  transition:border-color .2s ease, background .2s ease;
  text-align:center;
}
.form__photos-drop:hover,
.form__photos-drop.is-drag {
  border-color:var(--gold, #c9a36a);
  background:rgba(201,163,106,.08);
}
.form__photos-drop-text {
  font-size:.95em;
  color:rgba(255,255,255,.78);
  pointer-events:none;
}
.form__photos-drop input[type="file"] {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  opacity:0;
  cursor:pointer;
  font-size:0;
}

/* Светлая тема (форма на /kalkulyator/ имеет светлый фон через .pform) */
.pform .form__photos-drop {
  border-color:rgba(20,40,30,.18);
  background:rgba(20,40,30,.03);
}
.pform .form__photos-drop:hover,
.pform .form__photos-drop.is-drag {
  border-color:var(--forest-2, #1f3a2c);
  background:rgba(31,58,44,.06);
}
.pform .form__photos-drop-text {
  color:rgba(20,40,30,.72);
}

/* Превью загруженных файлов */
.form__photos-list {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}
.form__photos-list:empty { margin-top:0; }
.form__photo-item {
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 32px 6px 6px;
  background:rgba(255,255,255,.06);
  border-radius:8px;
  border:1px solid rgba(255,255,255,.1);
  max-width:100%;
}
.pform .form__photo-item {
  background:rgba(20,40,30,.05);
  border-color:rgba(20,40,30,.12);
}
.form__photo-thumb {
  width:42px;
  height:42px;
  border-radius:6px;
  object-fit:cover;
  flex:0 0 42px;
}
.form__photo-meta {
  display:flex;
  flex-direction:column;
  font-size:.82em;
  line-height:1.3;
  overflow:hidden;
}
.form__photo-name {
  max-width:160px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.form__photo-size {
  opacity:.6;
  font-size:.92em;
}
.form__photo-remove {
  position:absolute;
  top:4px;
  right:4px;
  width:22px;
  height:22px;
  border:none;
  border-radius:50%;
  background:rgba(0,0,0,.4);
  color:#fff;
  font-size:14px;
  line-height:1;
  cursor:pointer;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.pform .form__photo-remove {
  background:rgba(20,40,30,.5);
}
.form__photo-remove:hover { background:#c0392b; }

@media (max-width:560px) {
  .form__photo-name { max-width:110px; }
  .form__photos-drop { min-height:64px; padding:12px 14px; }
}
