/* Harmonisation Design Walt Media Manager - Basé sur la capture */
#assets_block .wrapper-xsmall{
max-width: 1280px;
}
#assets_block .global-content ul{
    list-style: none;
}
#assets_block .global-content ul li{
  margin-left: 0;
  list-style-position: none;
  margin-bottom: 0;
}

:root {
    --wmm-primary: #007bff;
    --wmm-text-dark: #333;
    --wmm-text-gray: #888;
    --wmm-bg-light: #f4f4f4;
    --wmm-bg-sidebar: #ffffff;
    --wmm-border: #eeeeee;
    --wmm-active-bg: #f5f5f5;
    --wmm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wmm-explorer {
    font-family: var(--wmm-font);
    color: var(--wmm-text-dark);
    display: flex;
    flex-direction: column;
    background: #fff;
    min-height: 500px;
    border-radius: 8px;
}

/* Header & Search */
.wmm-explorer-header {
    /* background: #fff; */
    padding: 10px;
    /* margin-bottom: 20px; */
    border-bottom: 1px solid var(--wmm-border);
    
}

.wmm-search-container {
    position: relative;
    max-width: 400px;
    margin-left: auto;
}

.wmm-search-input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.wmm-search-input:focus {
    outline: none;
    border-color: var(--wmm-primary);
}

.wmm-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid var(--wmm-border);
    z-index: 1000;
    border-radius: 4px;
    margin-top: 5px;
    display: none;
    overflow: hidden;
}

.wmm-search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #f2f2f2;
}

.wmm-search-suggestion-item:last-child {
    border-bottom: none;
}

.wmm-search-suggestion-item:hover {
    background: #f8f9fa;
}

.wmm-search-suggestion-thumb {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    background: #eee;
}

.wmm-search-suggestion-item .wmm-folder-icon {
    margin-right: 10px;
}

.wmm-search-suggestion-details {
    display: flex;
    flex-direction: column;
}

.wmm-search-suggestion-hierarchy {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.wmm-search-suggestion-name {
    font-size: 13px;
    color: var(--wmm-text-dark);
    font-weight: 500;
}

.wmm-search-suggestion-match {
    font-size: 10px;
    color: var(--wmm-primary, #0073aa);
    font-weight: 500;
    margin-top: 2px;
    opacity: 0.8;
}

.wmm-search-loading,
.wmm-no-results {
    padding: 15px;
    text-align: center;
    color: #999;
    font-size: 13px;
    background: #fff;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wmm-search-loading .loader {
    margin: 0 auto;
}


/* Contenu Principal Layout */
.wmm-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 10px;
}

/* Sidebar Tree */
.wmm-sidebar {
    background: var(--wmm-bg-sidebar);
    border-right: 1px solid var(--wmm-border);
    padding: 20px 0;
}

.wmm-sidebar-tree {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block; /* S'assurer que le premier niveau est visible */
}

.wmm-sidebar-tree ul {
    list-style: none;
    margin: 0;
    padding-left: 15px;
}

.wmm-sidebar-item {
    margin: 0;
}

.wmm-sidebar-item-header {
    display: flex;
    align-items: flex-start; /* Changed from center to align with top of text */
    padding: 6px 15px;
    cursor: pointer;
    font-size: 13px; /* Slightly reduced for better fit */
    color: var(--wmm-text-dark);
    transition: background 0.1s;
    font-weight: 600;
    text-transform: uppercase;
}

.wmm-sidebar-item-header:hover {
    background: #f0f0f0;
}

.wmm-sidebar-item.active > .wmm-sidebar-item-header {
    background: #f0f0f0;
    color: var(--wmm-primary);
}

.wmm-toggle {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    font-size: 14px;
    color: #999;
    transition: transform 0.2s ease;
    cursor: pointer;
    flex-shrink: 0; /* Important: don't shrink when text wraps */
    margin-top: -2px; /* Visual adjustment for flex-start */
}

.wmm-toggle.wmm-expanded {
    transform: rotate(90deg);
}

.wmm-sidebar-icon {
    margin-right: 8px;
    font-size: 14px;
    color: var(--wmm-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Important: don't shrink when text wraps */
    margin-top: 1px; /* Visual adjustment for flex-start */
}

.wmm-name {
    flex: 1;
    line-height: 1.3;
    word-break: break-word; /* Ensure wrapping */
}

/* Main Content area */
.wmm-main-content {
    padding: 20px;
    /* padding: 20px 20px 20px 40px; */
}

.wmm-main-header {
    margin-bottom: 20px;
}

/* Breadcrumb */
.wmm-breadcrumb {
    display: flex;
    align-items: center;
    font-size: 22px;
    color: #333;
    font-weight: 500;
}

.wmm-breadcrumb-item {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.wmm-breadcrumb-item.current {
    font-weight: bold;
}

.wmm-breadcrumb-separator {
    margin: 0 10px;
    color: #666;
    font-size: 18px;
    font-weight: normal;
}

/* Download Icon in breadcrumb */
.wmm-breadcrumb .wmm-download-folder {
    background: none;
    border: none;
    padding: 0;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-top: 0;
}

.wmm-icon-download {
    font-size: 16px;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Sections titles */
.wmm-section-title {
    font-size: 14px;
    color: #999;
    font-weight: normal;
    margin: 25px 0 12px 0;
    text-transform: capitalize;
}

/* Folders Grid */
.wmm-folders-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.wmm-folder-card {
    /* width: 20%; */
    width: calc(20% - 15px);
    /* border: 1px solid #f2f2f2; */
    border-radius: 12px;
    /* background: #fff; */
    background: #f2f2f2;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s;
    display: flex;
    flex-direction: column;
    padding: 11px;
}

.wmm-folder-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    background-color: #E3E4E3;
}

.wmm-folder-card-header {
    /* padding: 10px 12px; */
    display: flex;
    align-items: center;
    gap: 6px;
    
    margin-bottom: 12px;
    /* background: #fff; */
}

.wmm-folder-icon {
    font-size: 14px;
    color: var(--wmm-primary);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wmm-folder-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    color: #333;
}

.wmm-folder-card .wmm-download-folder {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition all ease 0.2s;
    margin-top: 0;
    border-radius: 100%;
    width: 22px;
    height: 22px;
    position: relative;
    
}
.wmm-folder-card .wmm-download-folder:hover{
    color: black;
    background-color: #F2E66F;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);

}
.wmm-folder-card .wmm-download-folder i{
position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
    

.wmm-folder-card .wmm-icon-download {
    /* width: 14px;
    height: 14px; */
}

.wmm-folder-card-thumbnail {
    height: 138px;
    background-color: #fff;
    /* background: #fafafa; */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
    /* border-top: 1px solid #f9f9f9; */
}

.wmm-folder-card-thumbnail img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Files List */
.wmm-files-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.wmm-file-row {
    background: #f2f2f2;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.1s, box-shadow 0.1s;
}

.wmm-file-row:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background-color: #E3E4E3;
}

.wmm-file-row-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.wmm-file-icon {
    font-size: 14px;
    color: #666;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wmm-file-name {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    color: #333;
}

.wmm-download-file-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.wmm-download-file-btn .wmm-icon-download {
    width: 14px;
    height: 14px;
}

/* Notifications & Loading */
.wmm-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 4px;
    background: #333;
    color: white;
    font-size: 12px;
    z-index: 1000;
}

.wmm-loading {
    padding: 40px;
    text-align: center;
    color: #999;
    width: 100%;
}

/* Loader Styles (Dot Animation) */
.loader-form {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.loader-form b {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #f1c40f; /* Yellow from theme */
    display: inline-block;
    animation: wmm-loading-dots 1.4s infinite ease-in-out both;
}

.loader-form b:nth-child(1) { animation-delay: -0.32s; }
.loader-form b:nth-child(2) { animation-delay: -0.16s; }

@keyframes wmm-loading-dots {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.wmm-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: #333;
    border-radius: 50%;
    animation: wmm-spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes wmm-spin {
    to { transform: rotate(360deg); }
}

.wmm-no-files {
    font-size: 12px;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* Responsive */
@media (max-width: 900px) {
    .wmm-content {
        grid-template-columns: 1fr;
    }
    
    .wmm-sidebar {
        display: none;
    }
    
    /* .wmm-main-content {
        padding-left: 20px;
    } */
}
/* Order Download Section in WooCommerce */
.wmm-order-download-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 25px;
    width: 100%;
}

.wmm-order-section-title {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 700;
}

.wmm-order-download-card {
    background: #FFFFFF;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border: 1px solid #eee;
    
}
.wmm-button.wmm-order-download-btn{
    font-family: var(--buttons-font);
    font-size: var(--buttons-size);
    font-weight: var(--buttons-weight);
    line-height: var(--buttons-lh);
    letter-spacing: var(--buttons-letter-spacing);
    text-transform: var(--buttons-upp);
    color: var(--button-text-color);
    background-color: var(--button-bg-color);
    border-radius: 0;
    border-radius: var(--button-border-radius);
    padding: var(--space-xsmall) 20px;
    justify-content: center;
    align-items: center;
    gap: var(--space-xsmall);
    text-align: center;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all .3s ease-in-out;
    display: inline-flex;
    position: relative;
}
.wmm-button.wmm-order-download-btn:hover{
    color: var(--button-text-hover-color);
    background-color: var(--button-bg-hover-color);
}

.wmm-order-download-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.wmm-zip-icon {
    font-size: 32px;
    color: var(--wmm-primary);
}

.wmm-text-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.wmm-text-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.wmm-order-actions {
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* .wmm-button.wmm-order-download-btn {
    background: #333;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
} */


.wmm-button.wmm-order-download-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

.wmm-order-progress-wrapper {
    width: 100%;
    margin-top: 15px;
}

.wmm-order-progress-container {
    width: 100%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.wmm-order-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--wmm-primary);
    transition: width 0.3s ease;
}

.wmm-order-status-text {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    text-align: right;
    font-weight: 500;
}

@media (max-width: 768px) {
    .wmm-order-download-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .wmm-order-actions {
        width: 100%;
        align-items: center;
    }
}
