.reply-modal {
    max-width: 560px;
    text-align: right;
    color: #27324b;
}

.reply-modal .modal-content {
    border: 1px solid #e5e9f2;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(22, 32, 70, .22);
    overflow: hidden;
}

.reply-modal .modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #edf0f6;
    background: linear-gradient(120deg, #f4f6ff, #fff);
    gap: 16px;
}

.reply-modal__heading { display: flex; align-items: center; gap: 14px; }
.reply-modal__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 15px;
    color: #1128af;
    background: #e9edff;
    font-size: 23px;
}
.reply-modal .modal-title { font-size: 19px; font-weight: 700; line-height: 1.7; }
.reply-modal__subtitle { margin-top: 3px; font-size: 12px; color: #737d91; }
.reply-modal .btn-close { flex-shrink: 0; padding: 10px; margin: 0 auto 0 0; opacity: .55; }
.reply-modal .btn-close:hover { opacity: 1; }
.reply-modal .modal-body { padding: 24px 28px 8px; text-align: right; }
.reply-modal__recipient {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 24px;
    border-inline-start: 3px solid #5265cf;
    border-radius: 10px;
    background: #f5f7fc;
    color: #657089;
    font-size: 13px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.reply-modal__recipient strong { color: #27324b; margin-inline-start: 4px; }
.reply-modal__identity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.reply-modal__field { margin-bottom: 18px; min-width: 0; }
.reply-modal__field label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.reply-modal .form-control {
    padding: 12px 14px;
    border: 1px solid #dce2ed;
    border-radius: 11px;
    background: #fff;
    color: #27324b;
    font-size: 13px;
    line-height: 1.8;
    height: auto;
    transition: border-color .15s, box-shadow .15s;
}
.reply-modal .form-control::placeholder { color: #939caf; opacity: 1; }
.reply-modal .form-control:focus { border-color: #6576d8; box-shadow: 0 0 0 4px rgba(17, 40, 175, .08); }
.reply-modal textarea.form-control { min-height: 144px; max-height: 320px; resize: vertical; }
.reply-modal .reply-modal__field span.field-validation-error {
    display: block;
    padding: 0;
    margin: 6px 0 0;
    color: #bd354a;
    font-size: 12px;
    line-height: 1.8;
}
.reply-modal .form-control.input-validation-error { border-color: #bd354a; }
.reply-modal__hint { color: #737d91; font-size: 12px; line-height: 1.9; margin-top: -6px; }
.reply-modal .modal-footer { justify-content: flex-start; gap: 10px; padding: 20px 0; margin-top: 22px; border-top: 1px solid #edf0f6; }
.reply-modal .modal-footer .btn { margin: 0; padding: 11px 22px; min-height: 44px; border-radius: 11px; font-size: 13px; font-weight: 600; }
.reply-modal__submit { display: inline-flex; align-items: center; justify-content: center; gap: 18px; background: #1128af; color: #fff; box-shadow: 0 4px 12px rgba(17, 40, 175, .16); }
.reply-modal__submit:hover { background: #0d208e; color: #fff; }
.reply-modal__cancel { color: #657089; background: #f3f5f9; }
.reply-modal__cancel:hover { color: #27324b; background: #e9edf5; }
.reply-modal .btn:focus-visible, .reply-modal .btn-close:focus-visible { outline: 3px solid #6576d8; outline-offset: 3px; }

@media (max-width: 575.98px) {
    .reply-modal { margin: 12px; }
    .reply-modal .modal-header { padding: 20px; }
    .reply-modal .modal-body { padding: 20px 20px 4px; }
    .reply-modal__identity { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .reply-modal .modal-title { font-size: 17px; }
    .reply-modal__submit { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .reply-modal .form-control { transition: none; }
}
