/* Container */
.lmc-dashboard-wrapper {
    width: 100%;
    max-width: 100%;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    color: #333;
}

/* Menu Block */
.lmc-menu-block {
    margin-bottom: 10px;
    border-radius: 6px;
    background-color: #fff;
    border: 1px solid #e2e4e7; 
    overflow: visible; 
    position: relative;
    transition: background-color 0.3s ease;
}

/* --- HEADER LAYOUT (Uppdaterad för gruppering till höger) --- */
.lmc-menu-header {
    display: flex;
    align-items: center;
    /* justify-content: flex-start; gör att vi kan styra avståndet med margins istället */
    justify-content: flex-start; 
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    color: #1d2327; 
    font-weight: 600;
    font-size: 12px;
    background: transparent;
}

.lmc-menu-header:hover {
    background-color: rgba(0,0,0,0.02);
}

.lmc-menu-title {
    /* Detta är nyckeln: margin-right: auto puttar allt annat till högerkanten */
    margin-right: auto; 
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- FÄRGVÄXLARE --- */
.lmc-color-picker-wrapper {
    position: relative;
    /* Litet avstånd till drag-handtaget bredvid */
    margin-right: 4px; 
    display: flex;
    align-items: center;
    height: 100%;
}

.lmc-color-icon {
    font-size: 14px;
    cursor: pointer;
    opacity: 0; 
    transition: opacity 0.2s;
    padding: 6px; /* Lite större klickyta */
}

/* Visa ikon vid hover ELLER när paletten är öppen */
.lmc-menu-header:hover .lmc-color-icon,
.lmc-color-picker-wrapper.show-palette .lmc-color-icon {
    opacity: 0.5;
}

.lmc-color-icon:hover {
    opacity: 1 !important;
}

.lmc-color-palette {
    display: none; 
    position: absolute;
    top: -6px;
    right: 34px; /* Flyttar paletten till vänster om ikonen så den inte täcker pilen */
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 8px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    white-space: nowrap;
    z-index: 100;
    align-items: center;
    gap: 6px;
}

.lmc-color-picker-wrapper.show-palette .lmc-color-palette {
    display: flex;
}

.lmc-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: inline-block;
}

.lmc-color-dot:hover {
    transform: scale(1.3);
    border-color: #999;
}

/* --- DRAG HANDLE (Justerad) --- */
.lmc-drag-handle {
    cursor: grab;
    padding: 0 8px; /* Tajtare padding */
    color: #a0a0a0;
    font-size: 16px;
    line-height: 1;
    margin-right: 2px; /* Litet avstånd till pilen */
}
.lmc-drag-handle:hover {
    color: #555;
}

/* Toggle Icon */
.lmc-toggle-icon {
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.lmc-menu-block.is-open .lmc-toggle-icon {
    transform: rotate(180deg);
}

/* Content */
.lmc-menu-content {
    display: none; 
    border-top: 1px solid rgba(0,0,0,0.05); 
}

.lmc-static-open .lmc-menu-content {
    display: block !important;
    border-top: none;
}

.lmc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.lmc-item a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #50575e;
    font-size: 13px;
    font-weight: 400;
    transition: background-color 0.1s ease;
}

.lmc-item a:hover {
    background-color: rgba(255,255,255,0.6); 
    color: #000;
}

.lmc-label {
    flex-grow: 1;
}

/* Badges */
.lmc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    margin-left: 8px;
    min-width: 18px;
}

.lmc-badge-1 {
    background-color: rgba(0,0,0,0.06); 
    color: #333;
    border: 1px solid rgba(0,0,0,0.05);
}

.lmc-badge-2 {
    background-color: #ffeaea;
    color: #c00;
    border: 1px solid #fcc;
}

/* Drag Visuals */
.ui-sortable-placeholder {
    border: 1px dashed #c3c4c7;
    visibility: visible !important;
    height: 40px !important;
    background: #fbfbfc;
    border-radius: 6px;
    margin-bottom: 10px;
}