/* ═══════════════════════════════════════════════════════════════════════════
   ✂️ CORTE DO CARD (RENDER ROLL) — skin PINK do feed-ias
   Tokens herdados do :root do feed (--accent #ff2e88, --bg #0a0a0d, fontes).
   Fallbacks embutidos caso carregue fora do feed.
   ═══════════════════════════════════════════════════════════════════════════ */

/* 🔥 OVERLAY — escuro com um brilho rosa suave (delicado, "aberto") */
.crop-editor-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(1100px 560px at 50% -6%, rgba(255,46,136,.12), transparent 60%),
        rgba(8, 8, 11, .93);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    opacity: 0;
    transition: opacity .3s ease;
    cursor: crosshair;
    font-family: var(--font-b, 'Instrument Sans', sans-serif);
}

.crop-editor-overlay.active {
    display: flex;
    opacity: 1;
}

/* 📦 CONTAINER */
.crop-editor-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

/* ✕ FECHAR — círculo preto, contorno rosa (igual linguagem da index) */
.crop-editor-close {
    position: fixed;
    top: 22px;
    right: 22px;
    width: 46px;
    height: 46px;
    background: rgba(19, 19, 24, .85);
    color: var(--accent, #ff2e88);
    border: 1.5px solid var(--accent, #ff2e88);
    font-size: 22px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer !important;
    transition: all .25s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    font-weight: 700;
}

.crop-editor-close:hover {
    background: var(--accent, #ff2e88);
    color: #0a0a0d;
    transform: rotate(90deg) scale(1.06);
    box-shadow: 0 8px 24px rgba(255, 46, 136, .45);
}

/* 📸 ÁREA DO CANVAS */
.crop-editor-canvas-area {
    position: relative;
    max-width: 90vw;
    max-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cropEditorCanvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    cursor: crosshair !important;
    user-select: none;
    -webkit-user-select: none;
    border-radius: 6px;
}

/* ✂️ SELEÇÃO — borda rosa fina e delicada, com brilho suave */
.crop-selection {
    position: absolute;
    border: 2px solid var(--accent, #ff2e88);
    border-radius: 3px;
    box-shadow:
        0 0 0 9999px rgba(8, 8, 11, .60),
        0 0 22px rgba(255, 46, 136, .45),
        inset 0 0 0 1px rgba(255, 255, 255, .18);
    cursor: move;
    display: none;
    pointer-events: all;
}

.crop-selection.active {
    display: block;
}

/* 🎯 HANDLES — bolinhas brancas com aro rosa, menores e finas */
.crop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid var(--accent, #ff2e88);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(255, 46, 136, .5);
    transition: all .2s ease;
    pointer-events: all;
    z-index: 10;
}

.crop-handle:hover {
    background: var(--accent, #ff2e88);
    border-color: #fff;
    transform: scale(1.3);
}

.crop-handle.nw { top: -7px; left: -7px; cursor: nw-resize !important; }
.crop-handle.ne { top: -7px; right: -7px; cursor: ne-resize !important; }
.crop-handle.sw { bottom: -7px; left: -7px; cursor: sw-resize !important; }
.crop-handle.se { bottom: -7px; right: -7px; cursor: se-resize !important; }
.crop-handle.n  { top: -7px; left: 50%; transform: translateX(-50%); cursor: n-resize !important; }
.crop-handle.s  { bottom: -7px; left: 50%; transform: translateX(-50%); cursor: s-resize !important; }
.crop-handle.w  { top: 50%; left: -7px; transform: translateY(-50%); cursor: w-resize !important; }
.crop-handle.e  { top: 50%; right: -7px; transform: translateY(-50%); cursor: e-resize !important; }

/* 🎬 AÇÕES — pills, igual aos botões da index */
.crop-editor-actions {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 1000;
}

.crop-btn {
    padding: 13px 34px;
    border-radius: 100px;
    font-family: var(--font-b, 'Instrument Sans', sans-serif);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer !important;
    transition: all .25s ease;
    display: flex;
    align-items: center;
    gap: 9px;
    justify-content: center;
    min-width: 150px;
}

.crop-btn span:first-child { font-size: 17px; }

/* ↩︎ RESETAR — só contorno rosa + preto */
.crop-reset-btn {
    background: #0a0a0d;
    color: var(--accent, #ff2e88);
    border: 1.5px solid var(--accent, #ff2e88);
}

.crop-reset-btn:hover {
    background: rgba(255, 46, 136, .12);
    transform: translateY(-2px);
}

/* ✂️ CORTAR — rosa sólido (igual "Criar vídeo") */
.crop-apply-btn {
    background: var(--accent, #ff2e88);
    color: #fff;
    border: 1.5px solid var(--accent, #ff2e88);
    box-shadow: 0 8px 26px rgba(255, 46, 136, .40);
}

.crop-apply-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 46, 136, .55);
}

/* 📏 INFO DO CROP — discreta, rosa */
.crop-info {
    position: fixed;
    bottom: 118px;
    left: 22px;
    background: rgba(19, 19, 24, .72);
    backdrop-filter: blur(10px);
    color: var(--ink, #ecebe6);
    border: 1px solid rgba(255, 46, 136, .25);
    padding: 9px 13px;
    border-radius: 12px;
    font-family: var(--font-m, 'Space Mono', monospace);
    font-size: 11px;
    z-index: 1000;
    display: none;
    opacity: .85;
    transition: opacity .3s ease;
    pointer-events: none;
}

.crop-info:hover { opacity: 1; }
.crop-info.active { display: block; }

.crop-info-title {
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--accent, #ff2e88);
}

.crop-info-item {
    margin: 2px 0;
    opacity: .9;
    font-size: 10px;
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
    .crop-editor-canvas-area { max-height: 58vh; }
    .crop-editor-actions { flex-direction: column; bottom: 22px; width: min(90vw, 320px); }
    .crop-btn { width: 100%; }
    .crop-info { font-size: 10px; padding: 7px 11px; bottom: 96px; }
}
