/**
 * Reusable modal styles.
 */

.agent-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(23, 51, 68, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.agent-modal-overlay.active {
    display: flex;
}

.agent-modal {
    background: #e2eded;
    color: #173344;
    width: 100%;
    max-width: 520px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(23, 51, 68, 0.35);
    max-height: 90vh;
    overflow-y: auto;
}

.agent-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #173344;
}

.agent-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #173344;
}

.agent-modal-close {
    background: transparent;
    border: none;
    color: #173344;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.agent-modal-close:hover {
    color: #c0392b;
}

.agent-modal-body {
    padding: 1.25rem;
}

.agent-modal-body form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #173344;
}

.agent-modal-body form input,
.agent-modal-body form select,
.agent-modal-body form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #173344;
    border-radius: 4px;
    background: #ffffff;
    color: #173344;
    font-size: 1rem;
}

.agent-modal-body form input:focus,
.agent-modal-body form select:focus,
.agent-modal-body form textarea:focus {
    outline: 2px solid #85ad86;
}

.agent-modal-body .form-hint {
    font-size: 0.85rem;
    color: #173344;
    margin-top: -0.75rem;
    margin-bottom: 1rem;
}

.agent-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.agent-modal-actions .btn,
.agent-modal-body .btn {
    min-width: 90px;
}

.agent-modal-errors {
    margin-bottom: 1rem;
}

.agent-modal .notice {
    margin-bottom: 1rem;
}
