/* container */
.bondix-wrap { max-width: 900px; margin: 0 auto; padding: 18px; font-family: Arial, sans-serif; }

/* gallery grid */
.bondix-gallery { display:grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap:14px; }

/* item */
.bx-item { position:relative; background:#fff; border-radius:10px; box-shadow:0 6px 18px rgba(0,0,0,0.06); padding-bottom:10px; overflow:visible; }
.bx-item img { width:100%; height:auto; display:block; border-radius:10px 10px 0 0; }

/* delete button smaller and higher */
.bx-delete {
    position:absolute;
    top:6px;
    right:6px;
    z-index:20;
    background:rgba(0,0,0,0.6);
    color:#fff;
    border:0;
    width:30px;
    height:30px;
    border-radius:50%;
    font-size:18px;
    line-height:28px;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

/* description input */
.bx-desc {
    box-sizing:border-box;
    width:92%;
    margin:10px auto 8px auto;
    display:block;
    padding:8px 10px;
    border-radius:8px;
    border:1px solid #ddd;
    font-size:14px;
    transition: box-shadow .12s ease, border-color .12s ease;
}
.bx-desc:focus { outline:none; border-color:#0073aa; box-shadow:0 2px 8px rgba(0,115,170,0.08); }
.bx-desc.bx-saved { box-shadow:0 0 0 3px rgba(0,200,83,0.06); }

/* modal overlay */
.bx-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:9999; align-items:center; justify-content:center; padding:20px; }
.bx-modal .bx-modal-inner { width:100%; max-width:840px; max-height:85vh; background:#fff; border-radius:12px; position:relative; overflow:auto; padding:14px; box-sizing:border-box; }
.bx-modal-close { position:absolute; top:8px; right:8px; background:transparent; border:0; font-size:20px; cursor:pointer; }

/* crop area */
.bx-crop-area { width:100%; text-align:center; padding:6px 0; }
.bx-crop-area img { max-width:100%; display:block; margin:0 auto; }

/* footer buttons inside modal */
.bx-modal-footer { display:flex; justify-content:flex-end; gap:10px; margin-top:10px; }

/* action buttons */
.bx-btn { padding:8px 14px; border-radius:8px; border:0; cursor:pointer; font-weight:600; }
.bx-btn-ghost { background:#f4f4f4; color:#333; }
.bx-btn-primary { background:#0073aa; color:#fff; }

/* MAKE SAVE BUTTON FIXED (always visible on screen) */
#bondix-save-crop,
#bondix-save-crop:focus { position:fixed !important; bottom:18px !important; left:50% !important; transform:translateX(-50%) !important; z-index:10001 !important; box-shadow:0 6px 18px rgba(0,0,0,0.25); }

/* ensure cancel remains within modal but not overlapping save btn */
#bondix-cancel-crop { position:relative; z-index:10000; }

/* custom scrollbar for modal (wider and more visible) */
.bx-modal-inner::-webkit-scrollbar {
    width: 12px;
}
.bx-modal-inner::-webkit-scrollbar-track {
    background: #e1e1e1;
    border-radius: 10px;
}
.bx-modal-inner::-webkit-scrollbar-thumb {
    background: #999;
    border-radius: 10px;
}
.bx-modal-inner::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* small responsive tweaks */
@media (max-width:480px) {
    .bx-delete { width:26px; height:26px; font-size:16px; line-height:24px; top:4px; right:4px; }
    #bondix-save-crop { padding:10px 18px; bottom:12px; }
}

.upload-icon-wrapper {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.upload-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 38px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: 2px solid #eee;
}

/* empty placeholder */
.bx-empty {
    text-align:center;
    padding:40px;
}
.bx-empty-img {
    width:120px;
    opacity:0.4;
    margin-bottom:10px;
}
