/*
 * nicer-pricer photo-attach widget — Cropper.js modal styling.
 * Scoped to .np-photo-attach__... to avoid collisions with site.css/nicer.css.
 */

.np-photo-attach__modal {
  display: none;
  position: fixed;
  inset: 0;
  /* Yii Debug-Toolbar nutzt 100000 — wir müssen drüber. */
  z-index: 100001;
  align-items: center;
  justify-content: center;
}

.np-photo-attach__modal--open {
  display: flex;
}

.np-photo-attach__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.np-photo-attach__box {
  position: relative;
  background: var(--np-paper, #fff);
  border: 1.5px solid var(--np-ink, #1a1a1a);
  width: min(95vw, 720px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.np-photo-attach__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--np-line-soft, #ddd);
}

.np-photo-attach__title {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--np-ink, #1a1a1a);
}

.np-photo-attach__close {
  background: transparent;
  border: 0;
  font-size: 24px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--np-graphite, #555);
}

.np-photo-attach__close:hover {
  color: var(--np-ink, #000);
}

.np-photo-attach__stage {
  flex: 1 1 auto;
  min-height: 0;
  background: #111;
  width: 100%;
  height: 60vh;
  overflow: hidden;
  display: block;
}

.np-photo-attach__img {
  display: block;
  max-width: 100%;
  /* Cropper.js requires the img to be visible & sized before init. */
}

.np-photo-attach__keep {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--np-line-soft, #ddd);
  font-size: 13px;
  color: var(--np-graphite, #555);
  cursor: pointer;
}

.np-photo-attach__keep-input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.np-photo-attach__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--np-line-soft, #ddd);
  background: var(--np-paper, #fff);
}

.np-photo-attach__cancel,
.np-photo-attach__accept {
  /* Inherit np-btn sizing from nicer.css when present; fall back otherwise. */
  min-height: 38px;
}

/* Mobile: shorter stage so the buttons stay reachable on 360x640. */
@media (max-width: 768px) {
  .np-photo-attach__box {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: 0;
  }
  .np-photo-attach__stage {
    height: 50vh;
  }
  .np-photo-attach__head,
  .np-photo-attach__foot,
  .np-photo-attach__keep {
    padding-left: 12px;
    padding-right: 12px;
  }
}
