/* ═══════════════════════════════════════════════════════
   addCategoryForm.css — Modal catégorie V2 Premium
   ═══════════════════════════════════════════════════════ */

/* ── Wrapper remodal ── */
.remodal.v2-remodal.v2-category-modal {
    width: 360px !important;
    max-width: 92vw;
    padding: 0 !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.10) !important;
    background: #fff;
}

/* ── Header ── */
.v2-category-modal-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 18px 22px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-category-modal-header-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #f1f5f9;
    letter-spacing: 0.3px;
}

/* ── Body ── */
.v2-category-modal-body {
    padding: 20px 22px 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Field ── */
.v2-category-modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.v2-category-modal-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ── Input & Select ── */
.v2-category-modal-input {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

select.v2-category-modal-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.v2-category-modal-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
    background: #fff;
}

/* ── Color presets grid ── */
.v2-color-presets {
    display: grid;
    grid-template-columns: repeat(6, 32px);
    gap: 8px;
    margin-top: 2px;
}

.v2-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.v2-color-swatch:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.v2-color-swatch.selected,
.v2-color-swatch.active {
    border-color: #fff;
    outline: 2.5px solid #6366f1;
    outline-offset: 1px;
    transform: scale(1.15);
}

/* Masque le spectrum picker natif — on utilise uniquement les swatches */
.sp-replacer,
.sp-container {
    display: none !important;
}

#color {
    display: none !important;
}

/* ── Hidden native picker ── */
.pickerColor.hide {
    display: none;
}

/* ── Footer ── */
.v2-category-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 20px;
    border-top: 1px solid #f1f5f9;
    margin-top: 6px;
}

/* ── Buttons ── */
.v2-category-modal-btn {
    padding: 9px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.18s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0.2px;
}

.v2-category-modal-btn-cancel {
    background: #f1f5f9;
    color: #64748b;
}

.v2-category-modal-btn-cancel:hover {
    background: #e2e8f0;
    color: #334155;
}

.v2-category-modal-btn-save {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,0.30);
}

.v2-category-modal-btn-save:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    box-shadow: 0 4px 14px rgba(99,102,241,0.40);
    transform: translateY(-1px);
}

/* ── Responsive ── */
@media (max-width: 400px) {
    .remodal.v2-remodal.v2-category-modal {
        width: 95vw !important;
    }
    .v2-color-presets {
        grid-template-columns: repeat(6, 1fr);
    }
    .v2-color-swatch {
        width: 28px;
        height: 28px;
    }
}