/**
 * Moodboard Section Styles
 * Style identique à Product pour cohérence
 */

/* Layout : Grille à gauche, Sidebar à droite - Style Product */
.iai-moodboard-layout {
    display: grid;
    grid-template-columns: 1fr 204px;
    gap: 32px;
}

/* Content Area (grille à gauche) */
.iai-moodboard-content {
    min-width: 0;
}

/* Sidebar Filtres (à droite) */
.iai-moodboard-sidebar {
    position: fixed;
    top: 140px;
    right: 12%;
    width: 183px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: fit-content;
}

/* Boutons dans la sidebar */
.iai-moodboard-sidebar > .iai-create-moodboard-btn,
.iai-moodboard-sidebar > .iai-import-moodboard-btn {
    padding: 6px 17px 6px 7px;
    background: #343230;
    color: white;
    border: none;
    width: fit-content;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.iai-moodboard-sidebar > .iai-create-moodboard-btn:hover {
    background: #343230;
    transform: translateY(-1px);
}

.iai-moodboard-sidebar > .iai-import-moodboard-btn {
    background: white;
    color: #343230;
    border: 1px solid #E5E1DA;
}

.iai-moodboard-sidebar > .iai-import-moodboard-btn:hover {
    background: #f5f5f5;
    border-color: #343230;
}

.iai-moodboard-sidebar > .iai-moodboard-action-btn {
    width: 100%;
    padding: 10px 20px;
    background: white;
    color: #343230;
    border: 1px solid #E5E1DA;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.iai-moodboard-sidebar > .iai-moodboard-action-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #362B19;
}

.iai-moodboard-sidebar > .iai-moodboard-action-btn:disabled {
    cursor: not-allowed;
}

button#iai-delete-selected-moodboards-btn-sidebar {
    width: fit-content;
    padding: 9px 20px;
    color: #362B19;
    border: 1px solid #E5E1DA;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #F0EDE8 0% 0% no-repeat padding-box;
    border: 1px solid #E5E1DA;
    border-radius: 30px;
    transition: all 0.2s;
}

.iai-moodboard-sidebar > .iai-moodboard-action-btn svg,
.iai-moodboard-sidebar > .iai-create-moodboard-btn svg,
.iai-moodboard-sidebar > .iai-import-moodboard-btn svg {
    width: 25px;
    height: 25px;
}

section#section-moodboard {
    padding: 60px 12% 0 33px;
    position: relative;
}

.iai-moodboard-filters {
    background: white;
    padding: 20px;
    box-shadow: 0px 10px 24px #362B190A;
    border: 1px solid #E5E1DA;
    border-radius: 9px;
    margin-top: 10px;
}

/* Barre de recherche dans actions-bar - Style Product */
.iai-moodboard-search {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.iai-moodboard-search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.iai-moodboard-search-input:focus {
    outline: none;
    border-color: #f2330d;
    box-shadow: 0 0 0 3px rgba(242, 51, 13, 0.1);
}

.iai-moodboard-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
    pointer-events: none;
}

/* Barre d'actions - Style épuré */
.iai-moodboard-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.iai-moodboard-actions-left,
.iai-moodboard-actions-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.iai-moodboard-action-btn,
.iai-import-moodboard-btn,
.iai-create-moodboard-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.iai-import-moodboard-btn {
    padding: 10px 18px;
    background: white;
    color: #444;
    border: 1px solid #e5e5e5;
    font-size: 13px;
}

.iai-import-moodboard-btn:hover {
    border-color: #f2330d;
    color: #f2330d;
    background: #fff8f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(242, 51, 13, 0.1);
}

.iai-create-moodboard-btn {
    padding: 10px 18px;
    background: #f2330d;
    color: white;
    border: none;
    font-size: 13px;
    font-weight: 600;
}

.iai-create-moodboard-btn:hover {
    background: #d92d0b;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(242, 51, 13, 0.25);
}

/* Bouton Delete - Style Product */
.iai-moodboard-action-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
}

.iai-moodboard-action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
}

.iai-moodboard-action-btn:not(:disabled):hover {
    border-color: #f2330d;
    color: #f2330d;
    background: #fff5f3;
}

.iai-moodboard-action-btn svg {
    width: 16px;
    height: 16px;
}

/* Grille de moodboards - Style Product */
.iai-moodboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
    gap: 40px 10px;
    padding: 0;
}

/* Card Moodboard - Style Product */
.iai-moodboard-card {
    position: relative;
    cursor: pointer;
}

/* Wrapper Image - Style Product */
.iai-moodboard-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 133.33%; /* 3:4 aspect ratio (4/3 * 100) */
    background: #f5f5f5;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    border: 1px solid transparent;
}

/* Bordure noire quand la checkbox est cochée */
.iai-moodboard-image-wrapper:has(.iai-moodboard-select:checked) {
    border: 1px solid #000;
}

/* Image */
.iai-moodboard-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* Info - EN DESSOUS de la carte - Style Product */
.iai-moodboard-info {
    padding: 12px 4px 0 4px;
}

.iai-moodboard-title {
    margin: 0 0 4px 0;
    font-weight: 500;
    font-size: 13px;
    text-align: center;
    color: #343230;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badge type en absolute en haut à droite */
.iai-moodboard-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 999px;
    font-size: 11px;
    color: #343230;
    text-transform: capitalize;
    z-index: 10;
    font-weight: 500;
}

/* Checkbox - Style Product */
.iai-moodboard-select {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
    accent-color: #f2330d;
    appearance: none;
}

/* Actions slide - Style Product */
.iai-moodboard-actions-slide {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 38px;
    border-radius: 0 0 3px 3px;
    border: 1px solid #B3B1AE;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0 12px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}

.iai-moodboard-image-wrapper:hover .iai-moodboard-actions-slide {
    transform: translateY(0);
}

.iai-moodboard-action-btn-slide {
    position: relative;
    flex: 1;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
}

.iai-moodboard-action-btn-slide svg {
    width: 18px;
    height: 18px;
}

.iai-moodboard-action-btn-slide:hover {
    background: transparent;
    border-radius: 3px;
}

.iai-moodboard-action-btn-slide.liked {
    background: transparent;
    color: #343230;
}

.iai-moodboard-action-btn-slide.liked svg {
    fill: #343230;
}

.iai-moodboard-action-btn-slide.danger:hover {
    background: transparent;
}

/* Tooltips personnalisés pour les boutons */
.iai-moodboard-action-btn-slide[data-title]::after {
    content: attr(data-title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #222;
    color: white;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
}

.iai-moodboard-action-btn-slide:hover::after {
    opacity: 1;
}

/* Empty state */
.iai-moodboard-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.iai-moodboard-empty svg {
    width: 64px;
    height: 64px;
    color: #ccc;
    margin-bottom: 16px;
}

.iai-moodboard-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.iai-moodboard-empty p {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* Sidebar Filtres - Style épuré */
.iai-moodboard-filters h3 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #362B19;
}

/* Bouton Liked */
.iai-moodboard-filter-liked {
    width: 100%;
    padding: 12px 0;
    background: white;
    border: none;
    border-top: 1px solid #E5E1DA;
    border-bottom: 1px solid #E5E1DA;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    margin-bottom: 16px;
    color: #362B19;
}

.iai-moodboard-filter-liked svg {
    width: 18px;
    height: 18px;
}

.iai-moodboard-filter-liked.active svg {
    fill: currentColor;
}

/* Barre de recherche */
.iai-moodboard-search {
    position: relative;
    margin-bottom: 24px;
    display: flex;
}

.iai-search-input {
    width: 100%;
    padding: 8px 16px 8px 40px;
    border: 1px solid #343230;
    border-radius: 30px;
    font-size: 11px;
    font-family: inherit;
    transition: all 0.2s;
}

.iai-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(242, 51, 13, 0.08);
    background: white;
}

.iai-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
    pointer-events: none;
}

.iai-moodboard-filters h4 {
    margin: 0 0 10px 0;
    font-size: 12px;
    font-weight: 600;
    color: #362B19;
}

.iai-moodboard-filter-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.iai-moodboard-filter-item {
    padding: 4px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #7E7975;
    text-align: left;
    width: fit-content;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.iai-moodboard-filter-item:hover {
    background: #f8f8f8;
    color: #222;
}

.iai-moodboard-filter-item.active {
    font-weight: 500;
    background: #F0EDE8 0% 0% no-repeat padding-box;
    border: 1px solid #E5E1DA;
}

.iai-moodboard-filter-count {
    font-size: 11px;
    padding: 2px 7px;
    background: rgba(0,0,0,0.08);
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
}

.iai-moodboard-filter-item.active .iai-moodboard-filter-count {
    background: rgba(255,255,255,0.2);
}

/* MODALS */

/* Import Moodboard Modal */
.iai-import-moodboard-modal,
.iai-select-products-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.iai-import-moodboard-modal.active,
.iai-select-products-modal.active {
    display: flex;
}

.iai-import-moodboard-backdrop,
.iai-select-products-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

/* Create Moodboard Modal - Positionné sous sidebar et topbar */
.iai-create-moodboard-modal {
    position: fixed;
    top: 95px;
    left: 220px;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: none;
}

.iai-create-moodboard-modal.active {
    display: flex !important;
    animation: popupFadeIn 0.3s ease-out;
}

.iai-create-moodboard-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(252, 252, 253, 0.90);
    backdrop-filter: blur(8px);
    z-index: 1;
}

/* Create Moodboard - Layout 2 colonnes comme Import Product */
.iai-create-moodboard-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    gap: 0;
}

.iai-create-moodboard-modal.active .iai-create-moodboard-container {
    animation: popupSlideUp 0.3s ease-out;
}

/* Animations */
@keyframes popupFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.iai-create-moodboard-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px;
    overflow: auto;
}

.iai-create-moodboard-content-wrapper {
    width: 100%;
    max-width: 811px;
    background: #FFFFFF 0% 0% no-repeat padding-box;
    box-shadow: 0px 10px 24px #362B190A;
    border: 1px solid #E5E1DA;
    border-radius: 10px;
    padding: 2vw 5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.iai-create-moodboard-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    border-radius: 8px;
}

.iai-create-moodboard-close:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.iai-create-moodboard-close svg {
    color: #222;
}

.iai-create-moodboard-right {
    width: 480px;
    background: #fcfcfd;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px;
}

.iai-create-moodboard-header {
    display: flex;
    flex-direction: column;
    text-align: left;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 295px;
    margin-bottom: 24px;
}

.iai-create-moodboard-header-title {
    color: #343230;
    font-size: 24px;
    font-weight: 600;
}

.iai-create-moodboard-header p {
    font-size: 12px;
    color: #343230;
    margin-top: 5px;
    margin-bottom: 0;
}

/* Import Moodboard - Style original */
.iai-import-moodboard-content,
.iai-select-products-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.iai-select-products-content {
    max-width: 900px;
}

.iai-import-moodboard-close,
.iai-select-products-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.iai-import-moodboard-close:hover,
.iai-select-products-close:hover {
    background: #e0e0e0;
    color: #333;
}

.iai-import-moodboard-content h2,
.iai-select-products-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px 0;
}

.iai-import-moodboard-content p,
.iai-select-products-content p {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px 0;
}

/* Dropzone Create Moodboard - Style Import Product */
.iai-create-dropzone {
    width: 100%;
    max-width: 500px;
    flex-direction: column;
    padding: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 24px;
    background: white;
}

div#iai-create-moodboard-dropzone {
    background: #FAF9F8 0% 0% no-repeat padding-box;
    border: 1px dashed #E5E1DA;
    border-radius: 10px !important;
    padding: 0;
}

.iai-create-dropzone .innerUpload {
    border: 1px dashed #bbb;
    padding: 40px;
}

.iai-create-dropzone .innerUpload svg {
    width: 28px;
    height: auto;
    color: #999;
    margin-bottom: 5px;
}

.iai-create-dropzone:hover {
    border-color: #000;
    background: #f9f9f9;
}

.iai-create-dropzone.dragover {
    border-color: #000;
    background: #f9f9f9;
}

.iai-create-dropzone p {
    font-size: 12px;
    font-weight: 500;
    color: #343230;
    margin: 0 0 8px 0;
}

.iai-create-dropzone span {
    font-size: 12px;
    color: #7E7975;
}

/* Import Dropzone - Style original */
.iai-import-dropzone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 24px;
}

.iai-import-dropzone:hover {
    border-color: #222;
    background: #f8f8f8;
}

.iai-import-dropzone.dragover {
    border-color: #222;
    background: #f0f0f0;
}

.iai-import-dropzone svg {
    width: 48px;
    height: 48px;
    color: #999;
    margin-bottom: 16px;
}

.iai-import-dropzone p {
    font-size: 12px;
    font-weight: 500;
    color: #343230;
    margin: 0 0 8px 0;
}

.iai-import-dropzone span {
    font-size: 13px;
    color: #999;
}

/* Preview */
.iai-import-moodboard-preview-single {
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
}

.iai-import-moodboard-preview-image-single {
    width: 100%;
    height: auto;
    display: block;
}

.iai-create-moodboard-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.iai-create-preview-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 16px;
    align-items: start;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.iai-create-preview-image-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.iai-create-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iai-create-preview-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.iai-create-preview-fields .iai-form-group {
    margin-bottom: 0;
}

.iai-create-preview-fields label {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.iai-create-preview-fields input,
.iai-create-preview-fields select,
.iai-create-preview-fields .iai-preview-title,
.iai-create-preview-fields .iai-preview-type,
input.iai-preview-title,
select.iai-preview-type {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: white;
    color: #333;
    transition: all 0.2s;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
}

.iai-create-preview-fields input:focus,
.iai-create-preview-fields select:focus,
.iai-create-preview-fields .iai-preview-title:focus,
.iai-create-preview-fields .iai-preview-type:focus,
input.iai-preview-title:focus,
select.iai-preview-type:focus {
    outline: none;
    border-color: #222;
}

.iai-create-preview-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    color: #666;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.iai-create-preview-remove:hover {
    background: #e0e0e0;
    color: #333;
}

/* Selected Products Preview */
.iai-selected-products-preview {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.iai-selected-products-preview h4 {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iai-selected-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.iai-selected-product-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    border: 2px solid #222;
}

.iai-selected-product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iai-selected-product-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.iai-selected-product-remove:hover {
    background: rgba(0,0,0,1);
}

/* Divider */
.iai-create-moodboard-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.iai-create-moodboard-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.iai-create-moodboard-divider span {
    position: relative;
    background: white;
    padding: 0 16px;
    font-size: 13px;
    color: #999;
}

/* Select Products Button */
.iai-select-products-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 24px;
}

.iai-select-products-btn svg {
    width: 20px;
    height: 20px;
}

.iai-select-products-btn:hover {
    border-color: #222;
    background: #f8f8f8;
}

/* Form Create Moodboard - Style Import Product */
.iai-create-moodboard-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.iai-create-moodboard-form .iai-form-group {
    margin-bottom: 0;
}

.iai-create-moodboard-form .iai-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #7E7975;
    margin-bottom: 8px;
}

.iai-create-moodboard-form .iai-form-group input,
.iai-create-moodboard-form .iai-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #B3B1AE;
    font-size: 12px;
    font-family: inherit;
    color: #343230;
    background: white;
    transition: all 0.2s;
}

.iai-create-moodboard-form .iai-form-group input:focus,
.iai-create-moodboard-form .iai-form-group select:focus {
    outline: none;
    border-color: #000;
}

.iai-create-moodboard-form .iai-form-group input::placeholder {
    color: #B3B1AE;
}

.iai-create-moodboard-form .iai-form-group select {
    appearance: none;
    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='%23343230' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Actions Create Moodboard - Style Import Product */
.iai-create-moodboard-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

.iai-create-moodboard-cancel-btn {
    padding: 7px 30px;
    color: #343230;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: #F0EDE8;
    border: 1px solid #E5E1DA;
    border-radius: 30px;
    height: 30px;
    transition: all 0.2s;
}

.iai-create-moodboard-cancel-btn:hover {
    background: #E5E1DA;
    border-color: #343230;
}

.iai-create-moodboard-submit-btn {
    padding: 7px 30px;
    color: #343230;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: #F0EDE8;
    border: 1px solid #E5E1DA;
    border-radius: 30px;
    height: 30px;
    transition: all 0.2s;
}

.iai-create-moodboard-submit-btn:hover:not(:disabled) {
    background: #E5E1DA;
    border-color: #343230;
}

.iai-create-moodboard-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Form Import Moodboard - Style original */
.iai-import-moodboard-form {
    margin-bottom: 24px;
}

/* Actions Import/Select - Style original */
.iai-import-moodboard-actions,
.iai-select-products-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.iai-import-moodboard-cancel-btn,
.iai-select-products-cancel-btn {
    padding: 12px 24px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.iai-import-moodboard-cancel-btn:hover,
.iai-select-products-cancel-btn:hover {
    background: #f5f5f5;
}

.iai-import-moodboard-submit-btn,
.iai-select-products-submit-btn {
    padding: 12px 24px;
    border: none;
    background: #222;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.iai-import-moodboard-submit-btn:hover:not(:disabled),
.iai-select-products-submit-btn:hover:not(:disabled) {
    background: #333;
}

.iai-import-moodboard-submit-btn:disabled,
.iai-select-products-submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Select Products Modal */
.iai-select-products-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.iai-select-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.iai-select-product-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.iai-select-product-item:hover {
    border-color: #ccc;
}

.iai-select-product-item.selected {
    border-color: #222;
}

.iai-select-product-image-wrapper {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.iai-select-product-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iai-select-product-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    accent-color: #222;
    z-index: 10;
}

.iai-select-product-info {
    padding: 12px;
}

.iai-select-product-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iai-select-product-type {
    font-size: 11px;
    color: #999;
    text-transform: capitalize;
}

.iai-selected-count {
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .iai-moodboard-layout {
        flex-direction: column;
    }
    
    .iai-moodboard-sidebar {
        width: 100%;
    }
    
    .iai-moodboard-filters {
        position: static;
    }
}

@media (max-width: 768px) {
    .iai-moodboard-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .iai-moodboard-actions-left,
    .iai-moodboard-actions-right {
        width: 100%;
        justify-content: center;
    }
    
    .iai-moodboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* === MODAL EDIT MOODBOARD === */
.iai-edit-moodboard-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.iai-edit-moodboard-modal.active {
    display: flex;
}

.iai-edit-moodboard-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.iai-edit-moodboard-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.iai-edit-moodboard-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.iai-edit-moodboard-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.iai-edit-moodboard-form {
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.iai-edit-moodboard-image-container {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.iai-edit-moodboard-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.iai-edit-moodboard-form h2 {
    margin: 0 0 24px 0;
    font-size: 20px;
}

.iai-edit-moodboard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.iai-edit-moodboard-cancel-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.iai-edit-moodboard-cancel-btn:hover {
    background: #f5f5f5;
}

.iai-edit-moodboard-save-btn {
    padding: 10px 24px;
    background: #f2330d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.iai-edit-moodboard-save-btn:hover {
    background: #d92d0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(242, 51, 13, 0.3);
}
