/* Lightweight frontend styles for loadout display */
details.public-loadout { background: #1a1c1b; border: 1px solid #323633; padding: 15px; margin-top: 20px; font-family: 'Consolas', monospace; color: #dbde9b; }

details.public-loadout summary { 
    color: #7f8c46; 
    font-size: 14px; 
    text-transform: uppercase; 
    cursor: pointer; 
    list-style: none; /* Hides default arrow in most browsers */
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}

details.public-loadout summary::-webkit-details-marker { 
    display: none; /* Hides default arrow in Safari */
} 

details.public-loadout summary::after { 
    content: '\25BC'; /* Down arrow character */
    font-size: 12px; 
    transition: transform 0.2s ease-in-out; 
}

/* Rotate the arrow when the details tag is opened */
details.public-loadout[open] summary::after { 
    transform: rotate(-180deg); 
}

/* Add border and spacing below the summary when open */
details.public-loadout[open] summary {
    border-bottom: 1px solid #323633; 
    padding-bottom: 10px; 
    margin-bottom: 15px;
}

.public-loadout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.public-slot { background: #252926; padding: 10px; border: 1px solid #42473f; }
.public-slot-title { font-size: 11px; text-transform: uppercase; color: #6d7563; margin-bottom: 8px; }
.public-item { font-size: 13px; margin-bottom: 4px; padding-left: 10px; border-left: 2px solid #7f8c46; }
.public-weight-total { font-size: 16px; color: #7f8c46; margin-top: 15px; text-align: right; }
	
/* Layout Core */
.loadout-grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}
.section-title {
    color: #7f8c46;
    text-transform: uppercase;
    font-size: 14px;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #323633;
    padding-bottom: 5px;
    letter-spacing: 1px;
}
.mt-4 { margin-top: 25px; }
.mb-0 { margin-bottom: 0; }
.category-header {
    color: #8b9b4f;
    font-size: 12px;
    margin: 15px 0 5px 0;
    text-transform: uppercase;
}

/* Slot Styling */
.slot {
    background: rgba(20, 20, 20, 0.8);
    border: 1px dashed #3e4623;
    min-height: 60px;
    padding: 25px 10px 10px 10px; /* Space for the absolute label */
    position: relative;
    transition: background 0.2s, border-color 0.2s;
}
.slot::before {
    content: attr(data-slot-label);
    position: absolute;
    top: 5px;
    left: 8px;
    font-size: 10px;
    color: #6b7a33;
    text-transform: uppercase;
}
.slot.drag-over {
    background: rgba(139, 155, 79, 0.15);
    border-color: #8b9b4f;
}
.slot.slot-highlight {
    border-color: #ffd700;
}

/* Grid Definitions */
.body-slots-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.backpack-system {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.backpack-contents-slot {
    min-height: 120px;
}

/* Dynamic Pouches */
.pouches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}
.pouch-group {
    background: rgba(10, 10, 10, 0.5);
    border: 1px solid #2a2a2a;
    padding: 15px;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-left: 3px solid #5d6932;
}
.pouch-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pouch-header-bar h4 {
    margin: 0;
    font-size: 13px;
    color: #cfd2d6;
}
.btn-delete-pouch {
    background: #8b3a3a;
    color: white;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 11px;
    border-radius: 2px;
}
.btn-delete-pouch:hover { background: #a84646; }

/* Draggable Items */
.item {
    background: #1e1e1e;
    color: #d1d5db;
    border: 1px solid #323633;
    padding: 8px 10px;
    margin-bottom: 5px;
    cursor: grab;
    font-size: 12px;
    user-select: none;
}
.item:active { cursor: grabbing; }
.item.dragging {
    opacity: 0.4;
    border-color: #8b9b4f;
}
.item.selected-item {
    border-color: #ffd700;
    box-shadow: inset 0 0 8px rgba(255, 215, 0, 0.2);
}

@media (max-width: 900px) {
    .loadout-grid-container {
        grid-template-columns: 1fr;
    }
}