/* ===================================================
   CROP PRO — Professional Image Crop Modal
   Uses Cropper.js + Custom UI
   =================================================== */

#cropProModal {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    padding: 16px;
    animation: cropFadeIn 0.3s ease;
}
#cropProModal.active { display: flex; }
@keyframes cropFadeIn { from{opacity:0} to{opacity:1} }

.crop-pro-box {
    background: #1a1a1a;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(201,168,107,0.2);
    box-shadow: 0 32px 64px rgba(0,0,0,0.5);
}

.crop-pro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.crop-pro-header h3 {
    color: #c9a86b;
    font-family: 'Jost','Italiana',sans-serif;
    font-size: 1rem;
    font-weight: 500;
}
.crop-pro-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.crop-pro-close:hover { background: rgba(255,255,255,0.15); }

.crop-pro-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-height: 250px;
    max-height: 400px;
    background: #111;
}
.crop-pro-body img {
    display: block;
    max-width: 100%;
}

.crop-pro-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap;
}
.crop-tool-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #ddd;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.crop-tool-btn:hover { background: rgba(201,168,107,0.2); border-color: #c9a86b; color: #c9a86b; }
.crop-tool-btn.active { background: rgba(201,168,107,0.25); border-color: #c9a86b; color: #c9a86b; }

.crop-ratio-btns {
    display: flex;
    gap: 4px;
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.1);
}
.crop-ratio-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #aaa;
    font-size: 0.68rem;
    cursor: pointer;
    transition: all 0.2s;
}
.crop-ratio-btn:hover, .crop-ratio-btn.active { background: rgba(201,168,107,0.2); border-color: #c9a86b; color: #c9a86b; }

.crop-pro-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.crop-btn-save {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #c9a86b, #8a6f4d);
    color: #1a1a1a;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.crop-btn-save:hover { box-shadow: 0 4px 16px rgba(201,168,107,0.4); }
.crop-btn-skip {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: #aaa;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}
.crop-btn-skip:hover { border-color: rgba(255,255,255,0.3); color: #fff; }

/* Cropper.js overrides for gold theme */
.cropper-view-box { outline: 2px solid #c9a86b; outline-color: rgba(201,168,107,0.75); }
.cropper-line { background-color: #c9a86b; }
.cropper-point { background-color: #c9a86b; width: 8px; height: 8px; }
.cropper-dashed { border-color: rgba(201,168,107,0.4); }
.cropper-modal { background-color: rgba(0,0,0,0.6); }

@media (max-width: 600px) {
    .crop-pro-box { max-height: 95vh; border-radius: 12px; }
    .crop-pro-body { min-height: 200px; max-height: 300px; }
    .crop-tool-btn { width: 32px; height: 32px; font-size: 0.78rem; }
}
