/* Persistent input history dropdowns for #buttonStudentName and #buttonOther */

.history-input-wrapper {
    position: relative;
    display: block;
    margin-left: auto;
    align-self: flex-end;
    text-align: right;
    z-index: 99999;
}

.history-input-wrapper input {
    text-align: left;
}

.history-list,
.history-list * {
    box-sizing: border-box !important;
}

.history-list {
    display: none;
    position: fixed;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 160px !important;
    overflow-y: auto !important;
    z-index: 999999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.history-list.open {
    display: block;
}

.history-list li {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 2px 8px !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    cursor: pointer;
    color: #222;
    white-space: nowrap;
    text-align: left;
    flex-shrink: 0;
}

.history-list li:hover {
    background: #f0f0f0;
}

.history-list .history-text {
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.history-list .history-delete {
    margin-left: 8px !important;
    padding: 0 4px !important;
    color: #999;
    font-weight: bold;
    line-height: 1.3 !important;
}

.history-list .history-delete:hover {
    color: #c00;
}

.history-list .history-empty {
    padding: 4px 8px !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    color: #999;
    font-style: italic;
    cursor: default;
}
