/* Scoped to the photo module; no overrides of the surrounding application. */
.photo-input { min-width: 0; }
.photo-intro, .photo-help { color: var(--muted, #9caec3); font-size: 14px; margin: 0 0 18px; }
.photo-help { margin: 16px 0; }
.photo-editors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.photo-editor { min-width: 0; }
.photo-editor legend { font-weight: 600; padding: 0; }
.photo-guide { font-size: 14px; color: var(--muted, #9caec3); margin: 0 0 12px; }
.photo-source-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.photo-source-actions:has(.photo-camera-input[hidden]) { grid-template-columns: 1fr; }
.photo-camera-input { display: flex; min-width: 0; }
.photo-source-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 10px; font-size: 14px; line-height: 1.3; }
.photo-source-button svg { width: 18px; height: 18px; flex: 0 0 18px; }
.photo-camera-dialog { box-sizing: border-box; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 20px; border: 1px solid #35495e; border-radius: 14px; color: #e7eef8; background: #141f2e; }
.photo-camera-dialog::backdrop { background: #020810cc; }
.photo-camera-dialog h3 { font-size: 18px; margin: 0 0 16px; }
.photo-camera-stage { position: relative; width: min(100%, 55dvh); aspect-ratio: 1; margin-inline: auto; overflow: hidden; border-radius: 8px; background: #08111c; }
.photo-camera-dialog video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.photo-camera-grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.photo-depth { display: block; max-width: 100%; margin-top: 16px; font-size: 14px; }
.photo-depth input[type=range] { display: block; box-sizing: border-box; width: 100%; height: 36px; min-height: 36px; margin: 4px 0 0; padding: 0; accent-color: #69e2c0; cursor: pointer; }
.photo-depth-ends { display: flex; justify-content: space-between; color: #9caec3; font-size: 12px; }
.photo-camera-dialog p { color: #9caec3; font-size: 14px; }
.photo-stage { position: relative; margin-block: 36px; border-radius: 8px; background: #0e1724; isolation: isolate; }
.photo-stage, .photo-stage * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.photo-stage canvas { display: block; width: 100%; height: auto; border-radius: 8px; }
.photo-stage .photo-handle { position: absolute; box-sizing: border-box; transform: translate(-22px, -22px) rotate(var(--handle-angle)); transform-origin: 22px 22px; padding: 0; width: 88px; height: 44px; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: #82dfff; box-shadow: none; touch-action: none; cursor: grab; z-index: 1; }
.photo-handle-arrow { position: absolute; inset: 0; width: 88px; height: 44px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.photo-handle-arrow .photo-handle-outline { stroke: #08111c; stroke-width: 5; stroke-opacity: .85; }
.photo-handle-label { position: absolute; top: 11px; left: 55px; transform: rotate(calc(-1 * var(--handle-angle))); box-sizing: border-box; width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 6px; background: #102535ed; font-size: 13px; line-height: 20px; font-weight: 600; text-align: center; pointer-events: none; }
.photo-stage .photo-handle:disabled { opacity: .45; cursor: default; }
.photo-stage .photo-handle.is-dragging { cursor: grabbing; color: #c3f0ff; background: transparent; z-index: 3; }
.photo-stage .photo-handle:focus-visible { z-index: 2; outline: 2px solid #69e2c0; outline-offset: 3px; }
.photo-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.photo-editor-actions button { font-size: 14px; padding: 6px 9px; }
.photo-camera-dialog .photo-editor-actions { align-items: center; flex-wrap: nowrap; gap: 12px; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #293b4e; }
.photo-camera-dialog .photo-cancel { order: -1; min-height: 48px; padding: 10px 8px; border-color: transparent; background: transparent; color: #a9bbcd; }
.photo-camera-dialog .photo-cancel:hover { color: #e7eef8; background: #1b293b; }
.photo-camera-dialog .photo-shutter { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-left: auto; min-height: 48px; padding: 12px 16px; border: 1px solid #69e2c0; border-radius: 12px; background: #69e2c0; color: #102921; font-size: 16px; font-weight: 700; line-height: 1.25; box-shadow: 0 4px 14px #0003; cursor: pointer; }
.photo-camera-dialog .photo-shutter::before { content: ''; width: 20px; height: 20px; flex: 0 0 20px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 5 9.5 3h5L16 5h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E") center / contain no-repeat; }
.photo-camera-dialog .photo-shutter:hover:not(:disabled) { background: #8aefd3; border-color: #8aefd3; }
.photo-camera-dialog .photo-shutter:active:not(:disabled) { background: #50cda9; box-shadow: none; }
.photo-camera-dialog .photo-shutter:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.photo-camera-dialog .photo-editor-actions button:focus-visible { outline: 3px solid #69e2c0; outline-offset: 3px; }
@media (max-width: 360px) { .photo-camera-dialog .photo-shutter { padding-inline: 12px; font-size: 14px; } }
.photo-import { font-weight: 600; }
.photo-private { font-size: 12px; color: var(--muted, #9caec3); }
.photo-error, .photo-status { color: #ff9d97; font-size: 14px; margin: 10px 0 0; }
@media (max-width: 760px) { .photo-editors { grid-template-columns: 1fr; } }
