.rlr-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    font-family: system-ui, sans-serif;
}

.rlr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.rlr-modal-dialog {
    position: absolute;  /*allows free movement */
    max-width: 700px;
    margin: 60px auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 120px);
}

.rlr-modal-header,
.rlr-modal-footer {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.rlr-modal-footer {
    border-top: 1px solid #ddd;
    border-bottom: none;
    text-align: right;
}

.rlr-modal-body {
    padding: 10px 15px;
    overflow: auto;
}

.rlr-modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.rlr-modal-close {
    float: right;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.rlr-field-group {
    margin-bottom: 10px;
}

.rlr-field-group label {
    display: inline-block;
    margin-right: 10px;
}

.rlr-grid-wrapper {
    margin-top: 15px;
}

.rlr-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.rlr-grid {
    width: 100%;
    border-collapse: collapse;
}

.rlr-grid th,
.rlr-grid td {
    border: 1px solid #ddd;
    padding: 4px;
}

.rlr-grid input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.rlr-save-btn,
.rlr-cancel-btn,
.rlr-grid-add-row,
.rlr-grid-del-row,
.rlr-config-open-btn {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    border: 1px solid #888;
    background: #f5f5f5;
}

.rlr-save-btn {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
