html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: sans-serif;
}

/* ──────────────── TOP SECTION ──────────────── */

.top-container {
    height: 60px; /* fixed height for the textbox area */
    flex-shrink: 0;
    background: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 100;
    width: 100%;
}

.button-container {
    flex-shrink: 0;
    background: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 101;
}

.textbox-wrapper {
    height: 100%;
    position: relative;
}

#mainTextBox {
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    /*padding: 10px;*/
    resize: none;
}

.button-row {
    height: 100%;
    display: flex;
    flex-wrap: wrap;
}

.button-row button {
    flex: 1;
    white-space: nowrap;
    /*padding: 8px 12px;*/
    font-weight: bold;
    cursor: pointer;
    background-color: white;
}

button.selected-button {
    box-shadow: none;              /* Remove the shadow */
    border: 3px solid #000 !important;       /* Thicker, darker border */
    background-color: #ccc;       /* Or #aaa, something darker */
    color: #000; 
}

.menu-button-complete {
    background: #007f00;
}

.button-row button.menu-button-complete {
    background: #007f00 !important;
}


/* ──────────────── TAXONOMY SECTION ──────────────── */

.taxonomy-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.menu-container {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.left-bar, .right-content {
    box-sizing: border-box;
    overflow-y: auto;
    height: 100%;
    padding-top: 5px;
    padding-left: 5px;
    padding-right: 5px;
}

.left-bar {
    width: 30%;
    border-right: 1px solid #000;
    box-sizing: border-box;
}

.left-bar button {
    width: 100%;
    background-color: #fff;
    padding: 5px;
    text-align: left;
}

.right-content {
    width: 70%;
    box-sizing: border-box;
}

#rightContent .taxonomy-entry button {
    flex: 0 0 60px;
    margin-left: 5px;
    box-sizing: border-box;
}

#taxonomyMenuSingle {
    flex: 1;
    width: 100%;
    overflow-y: auto;
    padding: 10px;
}

/* ──────────────── ENTRY LAYOUT ──────────────── */

.taxonomy-entry {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 10px;
}

.taxonomy-entry button {
    padding-right: 6px;
    background-color: #fff;
    border: 1px solid #000000;
    font-weight: bold;
    cursor: pointer;
}

#taxonomyMenu {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#clear-button-wrapper {
    height: 30px;
}

.clear-button-wrapper {
    flex-shrink: 0;
    background: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 101;
}

/* This rule ensures the clear button spans the full width and
   matches the look of the other toggle buttons */
.clear-button-wrapper button {
    width: 100%;
    display: block;
    white-space: nowrap;
    font-weight: bold;
    cursor: pointer;
    background-color: white;
    border: 1px solid #000;  /* Matching border styling if desired */
}