
/* Modal Styles */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    box-shadow: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
/* Override for fullscreen dialogs to allow edge-to-edge content (like keyboard) */
.modal-content.fullscreen-dialog {
    padding: 0;
    background-color: #f3f4f6;
}

#scanner-output {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    margin: 15px 0;
    overflow-y: auto;
    background-color: #f9f9f9;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: monospace;
}
.enter-key {
    color: #28a745; /* green */
}
.delay-message {
    color: #dc3545; /* red */
}
.modal-content button {
    width: 100%;
    padding: 10px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

/* Mapping Modal Styles */
#mapping-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 0;
    font-size: 16px;
}
.mapping-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}
.mapping-row label {
    font-weight: bold;
    flex-basis: 150px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 10px;
}
.mapping-row label.mandatory-label {
    color: #dc3545;
}
.mapping-row select {
    flex-grow: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1em;
    background-color: #fff;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}
.modal-actions button {
    width: auto;
    padding: 12px 20px;
    font-weight: bold;
}
#mapping-cancel-btn {
    background-color: #6c757d;
}
#mapping-confirm-btn {
    background-color: #28a745;
}


/* Confirmation Modal */
.modal-dialog {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    text-align: center;
}
#confirm-message {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 25px;
}
#confirm-buttons {
    display: flex;
    justify-content: space-around;
    gap: 15px;
}
#confirm-buttons button {
    flex-grow: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: auto;
}
.confirm-btn-confirm {
    background-color: #dc3545; /* Red for destructive actions */
    color: white;
}
.confirm-btn-cancel {
    background-color: #6c757d;
    color: white;
}

/* Prompt Modal - Full Screen override */
#prompt-message {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
    white-space: pre-wrap; /* Enable newlines */
    text-align: center;
}
#prompt-input {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 20px;
    background-color: #fff;
    caret-color: #007bff; /* Explicit caret color */
}

#prompt-confirm-btn {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}
#prompt-cancel-btn {
    background-color: #6c757d;
    color: white;
    font-weight: bold;
}

/* Fullscreen and Conflict Modals Layout */
#fullscreen-buttons, #conflict-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
#fullscreen-buttons button, #conflict-buttons button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
}
#close-fullscreen-test-btn {
    background-color: #6c757d !important;
}

/* Conflict Modal specific overrides */
.conflict-timestamps {
    background-color: #f8f9fa;
    padding: 10px;
    margin-top: 20px;
    color: #6c757d;
}
#conflict-reload-btn {
    background-color: #28a745 !important;
    color: white;
}
#conflict-close-btn {
    background-color: #6c757d !important;
    color: white;
}

/* Fix #mapping-modal overlapping alert modals */
#confirm-modal, #prompt-modal {
    z-index: 1001;
}
