* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}

#app-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.file-section,
.input-picker,
.list-section,
.display-area,
.export-section {
    margin-bottom: 20px;
}

.export-section {
    margin-top: 20px;
}

.export-section>* {
    margin-right: 10px;
}

#drop-target {
    margin-top: 10px;
    padding: 10px;
    border: 2px dashed #ccc;
    text-align: center;
    color: #888;
    cursor: default;
}

#drop-target.dragging {
    background-color: #f0f0f0;
    border-color: #555;
}

ul#item-list {
    list-style-type: none;
    padding: 0;
    max-height: 9000px;
    overflow: auto;
    transition: max-height 0.2s ease-out;
}

.collapsible {
    cursor: pointer;
    user-select: none;
}

.collapsible::after {
    content: " ▼";
    /* Down arrow icon for expanded state */
    font-size: 0.8em;
}

.collapsible.collapsed::after {
    content: " (click to expand)";
    /* Right arrow icon for collapsed state */
}

ul#item-list.collapsed {
    max-height: 0;
    padding: 0;
    margin: 0;
}

ul#item-list li {
    padding: 10px;
    background-color: #fafafa;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    cursor: pointer;
}

ul#item-list li:hover {
    background-color: #eee;
}

#item-content {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    background-color: #fafafa;
}

ul#item-list li.selected-item {
    padding: 8px;
    border-width: 3px;
    border-color: gray;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

.txt-basic,
.txt-hex {
    font-family: monospace;
    word-break: break-all;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

#instructions {
    background: #f0f0f0;
    padding: 10px;
    margin-bottom: 20px;
}

/* Modal loader styles */
.modal-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75);
    /* Semi-transparent background */
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Spinner styles */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid transparent;
    border-top-color: #1f1f1f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

hr {
    height: 2px;
    border: none;
    background: #cccccc;
}

#sel-item-info {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    align-content: first baseline;
}

#sel-item-name {
    flex-grow: 1;
}

#sel-item-info button {
    margin-left: 10px;
}

.item-type-picker,
.input-picker {
    margin: 20px 0;
}