/* ══════════════════════════════════════════════════════
   Cutiora — css/photo-edit-window.css  (shared, 2026-11-23)
   The look of the "Edit photo" window (js/photo-edit-window.js) and of the small
   question windows (Download anyway? / Save to my frames). The same look as Collage
   Maker's windows (css/collage-maker.css .cm-edit…, items 220 / 229 / 230), written
   here once under the prefix wpe- so any tool can use them without loading the whole
   Collage Maker sheet. Collage Maker still has its own copy (live); moving it onto
   this file is a separate step, only with the owner's OK.
   ══════════════════════════════════════════════════════ */
.wpe { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(44, 20, 32, .62); }
.wpe[hidden] { display: none; }
.wpe-box {
  width: 100%; max-width: 520px; max-height: 100%; display: flex; flex-direction: column;
  background: #FFFDF3; border: 3px solid #2c2c2c; border-radius: 14px; box-shadow: 6px 6px 0 #2c2c2c; overflow: hidden;
}
.wpe-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 3px solid #2c2c2c; background: #FFE566; }
.wpe-head .sm-btn { min-height: 36px; padding: 4px 14px; }
.wpe-title { margin: 0; font: 400 19px 'Fredoka One', cursive; color: #2c2c2c; }
.wpe-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px 18px; overscroll-behavior: contain;
  background-color: #FFFDF3;
  background-image: radial-gradient(rgba(230, 0, 35, .07) 1.4px, transparent 1.6px); background-size: 18px 18px;
}
.wpe-view {
  position: relative; display: flex; justify-content: center; padding: 12px; margin-bottom: 8px;
  border: 3px solid #2c2c2c; border-radius: 14px; box-shadow: 3px 3px 0 #2c2c2c;
  background-color: #FDE3EC;
  background-image: radial-gradient(rgba(255, 255, 255, .85) 2px, transparent 2.2px); background-size: 16px 16px;
}
.wpe-view canvas { display: block; touch-action: none; cursor: grab; filter: drop-shadow(0 3px 8px rgba(60, 20, 40, .28)); }
.wpe-spin { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none; }
.wpe-spin.show { display: flex; animation: wpeSpinIn .12s linear .15s both; }   /* shows only when the work takes > 150 ms */
.wpe-spin::before { content: ''; width: 40px; height: 40px; box-sizing: border-box; border-radius: 50%; border: 5px solid rgba(255,255,255,.5); border-top-color: #E60023; animation: wpeSpin .8s linear infinite; }
@keyframes wpeSpinIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wpeSpin { to { transform: rotate(360deg); } }
.wpe-zoom { margin-bottom: 8px; background: #fff; border: 2px solid #2c2c2c; border-radius: 12px; padding: 8px 12px; }
.wpe .sm-btn { border: 2px solid #2c2c2c; box-shadow: 2px 2px 0 #2c2c2c; background: #fff; }
.wpe .sm-btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #2c2c2c; }
.wpe .wpe-main { background: #fff; color: #2c2c2c; }
.wpe .wpe-main:hover { background: #fff9e0; }
.wpe .wpe-ok { background: #4CAF50; color: #fff; }   /* "Save" (owner, 2026-11-23): the site's green, same as the Download button (main.css .w-btn-dl) */
.wpe .wpe-ok:hover { background: #43a047; }
.wpe .wpe-ok:disabled { opacity: .5; }
.wpe .wpe-go { background: #E60023; color: #fff; }
.wpe .wpe-go:hover { background: #c4001d; }
@media (max-width: 600px) {   /* phones: the edit window is full screen (small windows stay small) */
  .wpe:not(.wpe-small) { padding: 0; }
  .wpe:not(.wpe-small) .wpe-box { max-width: none; height: 100%; border: none; border-radius: 0; box-shadow: none; }
}
html.wpe-open, html.wpe-open body { overflow: hidden; }

/* small question windows: a title band, the text on a soft pink card, the buttons */
.wpe-small .wpe-box { max-width: 420px; height: auto; background: #FFF6F9; position: relative; }
.wpe-small .wpe-title { padding: 14px 44px 14px 16px; background: #FFE566; border-bottom: 3px solid #2c2c2c; }
.wpe-text { margin: 14px 18px; font: 700 14px/1.5 'Nunito', sans-serif; color: #444; }
.wpe-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 0 18px 18px; }
.wpe-x { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: none; background: transparent; font: 800 24px/1 'Nunito', sans-serif; color: #2c2c2c; cursor: pointer; }
.wpe-opt { display: flex; align-items: center; gap: 10px; margin: 0 18px 10px; padding: 10px 12px; background: #fff; border: 2px solid #2c2c2c; border-radius: 10px; box-shadow: 2px 2px 0 #2c2c2c; font: 700 15px 'Nunito', sans-serif; color: #2c2c2c; cursor: pointer; }
.wpe-opt input { width: 20px; height: 20px; accent-color: #E60023; }
/* a name box in a small window (Frames Maker → "Save to my frames": the person names their frame, item 282).
   16px text so iPhone does not zoom the page when it gets the focus. */
.wpe-name { display: block; margin: 0 18px 14px; font: 800 13px 'Nunito', sans-serif; color: #2c2c2c; }
.wpe-name input { display: block; box-sizing: border-box; width: 100%; margin-top: 6px; padding: 10px 12px; border: 2px solid #2c2c2c; border-radius: 10px; box-shadow: 2px 2px 0 #2c2c2c; background: #fff; font: 700 16px 'Nunito', sans-serif; color: #2c2c2c; }
.wpe-name input:focus { outline: 3px solid #FFE566; outline-offset: 1px; }
.wpe-note { margin: 0 18px 12px; font: 700 12px/1.4 'Nunito', sans-serif; color: #b3261e; }
