/* ============================================================
   PHOTO EDITOR STYLES
   ============================================================ */
.photo-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 700;
    background: #0B0C10;
    display: flex;
    flex-direction: column;
    color: #fff;
    font-family: inherit;
}

.pe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(.75rem + env(safe-area-inset-top, 0px)) 1rem .75rem;
    flex-shrink: 0;
}

.pe-title {
    font-weight: 600;
    font-size: 1rem;
}

.pe-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pe-icon-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.pe-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 0;
    padding: 8px;
}

.pe-canvas-wrap {
    position: relative;
    touch-action: none;
}

.pe-canvas-wrap canvas {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
}

#pe-canvas {
    position: relative;
    border-radius: 4px;
}

.pe-crop-box {
    position: absolute;
    border: 2px solid #FFB347;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.55);
    cursor: move;
}

.pe-crop-handle {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #FFB347;
    border: 3px solid #fff;
    cursor: nwse-resize;
}

.pe-panel {
    flex-shrink: 0;
    flex-direction: column;
    padding: .75rem 1rem;
}

.pe-hint {
    text-align: center;
    font-size: .8rem;
    color: rgba(255, 255, 255, 0.5);
}

.pe-slider-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
    color: rgba(255, 255, 255, 0.6);
}

.pe-slider-row input[type="range"] {
    flex: 1;
    width: 100%;
    min-width: 0;
    accent-color: #FFB347;
}

.pe-draw-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: .5rem;
}

.pe-draw-toggle {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: .5rem .8rem;
    border-radius: 10px;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    min-height: 40px;
}

.pe-draw-toggle.active {
    background: #FFB347;
    color: #1a1a1a;
}

.pe-color-dots {
    display: flex;
    gap: .4rem;
    flex: 1;
    justify-content: center;
}

.pe-color-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: block;
    box-shadow: 0 0 0 2px transparent;
}

.pe-color-dot.active {
    box-shadow: 0 0 0 2px #fff;
}

.pe-footer {
    flex-shrink: 0;
    display: flex;
    gap: .6rem;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
}

.pe-footer-btn {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: .8rem;
    font-size: .95rem;
    font-weight: 600;
    min-height: 44px;
}

.pe-back {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    flex: 0 0 100px;
}

.pe-next, .pe-send {
    background: #FFB347;
    color: #1a1a1a;
}

@media (prefers-reduced-motion: reduce) {
    .photo-editor-overlay * { transition: none !important; }
}
