.itfv3-modal[hidden] {
    display: none !important;
}

.itfv3-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.itfv3-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.itfv3-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #dcdcde;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    overflow: auto;
}

.itfv3-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.itfv3-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #1d2327;
}

.itfv3-modal__close,
.itfv3-edit-form__save,
.itfv3-edit-form__cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
}

.itfv3-modal__close,
.itfv3-edit-form__cancel {
    border: 1px solid #8c8f94;
    background: #ffffff;
    color: #1d2327;
}

.itfv3-modal__close:hover,
.itfv3-edit-form__cancel:hover {
    background: #f6f7f7;
    border-color: #646970;
}

.itfv3-edit-form__save {
    border: 1px solid #2271b1;
    background: #2271b1;
    color: #ffffff;
}

.itfv3-edit-form__save:hover {
    background: #135e96;
    border-color: #135e96;
}

.itfv3-edit-form__save:disabled,
.itfv3-edit-form__cancel:disabled,
.itfv3-modal__close:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.itfv3-edit-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.itfv3-edit-form__label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.itfv3-edit-form__role,
.itfv3-edit-form__content {
    border: 1px solid #8c8f94;
    border-radius: 8px;
    background: #ffffff;
    color: #1d2327;
}

.itfv3-edit-form__role {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 14px;
}

.itfv3-edit-form__content {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.5;
}

.itfv3-edit-form__role:focus,
.itfv3-edit-form__content:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.itfv3-edit-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
