@import url("/styles/modal-layout.css");
@import url('/styles/modal.css');
@import url('/styles/modal-actions.css');
@import url('/scripts/photo-editor.bundle.css');

.photo-editor-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgb(0 0 0 / 55%); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity var(--modal-open-dur) var(--modal-ease);
}
.photo-editor-overlay.is-open { opacity: 1; }
.photo-editor-overlay.is-closing { opacity: 0; transition-duration: var(--modal-close-dur); }
.photo-editor {
  /* Keep crop measurements stable while using the shared modal fade. */
  --modal-scale: 1; --modal-scale-close: 1;
  --modal-height: 42rem;
  z-index: 121;
}
.photo-editor-icon { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: .625rem; background: transparent; color: #999; cursor: pointer; }
.photo-editor-icon:hover:not(:disabled) { background: rgb(255 255 255 / 6%); color: #bbb; }
.photo-editor-icon svg { display: block; width: 1.25rem; height: 1.25rem; }
.photo-editor-stage { position: relative; height: min(40dvh, 20rem); min-height: 12rem; border-radius: 1rem; overflow: hidden; background: #131313; isolation: isolate; }
.photo-editor-stage .reactEasyCrop_CropArea { border: 1px solid rgb(255 255 255 / 55%); box-shadow: 0 0 0 9999em rgb(0 0 0 / 58%); }
.photo-editor-stage .reactEasyCrop_Container:focus-visible { outline: 2px solid #999; outline-offset: -2px; }
.photo-editor-stage[aria-disabled="true"] { pointer-events: none; opacity: .5; }
.photo-editor-controls { display: grid; gap: 1rem; margin: 1.25rem 0; padding: 0; border: 0; min-width: 0; }
.photo-editor-control { display: grid; grid-template-columns: 3rem minmax(0,1fr) 3rem; align-items: center; gap: 1rem; font-size: .875rem; }
.photo-editor-control label { color: #aaa; }
.photo-editor-control output { text-align: right; color: #999; font-variant-numeric: tabular-nums; }
.photo-editor-turn { justify-self: end; }
.photo-editor-control input[type="range"] { appearance: none; width: 100%; height: 1.5rem; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.photo-editor-control input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: #555; border-radius: 2px; }
.photo-editor-control input[type="range"]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -6.5px; border: 0; border-radius: 50%; background: #eee; }
.photo-editor-control input[type="range"]::-moz-range-track { height: 3px; background: #555; border-radius: 2px; }
.photo-editor-control input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #eee; }
.photo-editor :is(button,input):focus-visible { outline: 2px solid #999; outline-offset: 3px; }
.photo-editor-footer { display: flex; align-items: center; gap: .5rem; }
.photo-editor-actions { margin-top: 0; }
.photo-editor-reset { min-height: 2rem; margin-right: auto; padding: 0; border: 0; background: transparent; color: #999; font: inherit; font-size: .875rem; cursor: pointer; }
.photo-editor-reset:hover:not(:disabled) { color: #bbb; }
.photo-editor-save { position: relative; }
.photo-editor button:not(.button):disabled, .photo-editor-controls:disabled { opacity: .5; cursor: default; }
.photo-editor-save[aria-busy="true"] { opacity: 1; }
.photo-editor-save[aria-busy="true"] span { visibility: hidden; }
.photo-editor-save[aria-busy="true"]::after { content: ''; position: absolute; inset: 0; width: var(--button-spinner-size); height: var(--button-spinner-size); margin: auto; background: currentColor; mask: var(--loading-spokes-mask); animation: login-loading-spin .8s linear infinite; }
.photo-editor-error { color: #bbb; font-size: .875rem; margin: -.25rem 0 1rem; }
@media(max-width: 25rem) { .photo-editor-control { gap: .5rem; } }
@media(prefers-reduced-motion: reduce) { .photo-editor-overlay { transition: none; } .photo-editor-save[aria-busy="true"]::after { animation: none; } }
