/* Image cropper modal – reusable styles */
body.iuc-modal-open {
    overflow: hidden;
}

.iuc-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.iuc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
}

.iuc-modal {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.iuc-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.iuc-header-text {
    flex: 1;
    min-width: 0;
}

.iuc-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.iuc-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.iuc-close-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.iuc-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.iuc-counter {
    font-size: 0.8rem;
    color: #6b7280;
}

.iuc-body {
    padding: 16px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.iuc-crop-wrap {
    max-height: 55vh;
    background: #f3f4f6;
    overflow: hidden;
}

.iuc-crop-wrap img {
    display: block;
    max-width: 100%;
}

.iuc-footer {
    padding: 12px 18px 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.iuc-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}

.iuc-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.iuc-btn-cancel:hover {
    background: #e5e7eb;
}

.iuc-btn-skip {
    background: #fef3c7;
    color: #92400e;
}

.iuc-btn-skip:hover {
    background: #fde68a;
}

.iuc-btn-primary {
    background: #2563eb;
    color: #fff;
}

.iuc-btn-primary:hover {
    background: #1d4ed8;
}

.iuc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.iuc-hidden {
    display: none !important;
}

/* Hide native file input – only the styled Upload label is shown */
input[type="file"].iuc-file-input,
.iuc-file-input {
    display: none !important;
}

.iuc-upload-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Upload choose button (label) */
.iuc-file-label {
    display: inline-block;
    text-align: center;
    margin-top: 8px;
    padding: 8px 16px;
    background: var(--vs-theme-color1) !important;
    /* background: #2563eb; */
    color: #fff !important;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.15s;
}

.iuc-file-label:hover {
    background: #1d4ed8;
}

.iuc-size-hint {
    margin: 4px 0 0;
    font-size: 0.75rem;
    color: #6b7280;
}

.iuc-btn-remove {
    background: #fee2e2;
    color: #b91c1c;
}

.iuc-btn-remove:hover {
    background: #fecaca;
}

/* Multiple preview queue */
.iuc-multi-preview {
    margin-top: 14px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}

.iuc-multi-preview.iuc-preview-empty .iuc-preview-grid,
.iuc-multi-preview.iuc-preview-empty .iuc-preview-head {
    display: none;
}

.iuc-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.iuc-preview-count {
    font-size: 0.85rem;
    color: #475569;
}

.iuc-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px;
}

.iuc-preview-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.iuc-preview-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.iuc-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.iuc-preview-remove:hover {
    background: #dc2626;
}

/* Ratio Toolbar (Select Ratio: [ 1:1 ] [ 2:1 ]) */
.iuc-ratio-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.iuc-ratio-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.iuc-ratio-options {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.iuc-ratio-btn {
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.iuc-ratio-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.iuc-ratio-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

