html.zf-email-bind-modal-open,
html.zf-email-bind-modal-open body {
    overflow: hidden;
}

.zf-email-bind-modal,
.zf-email-bind-modal * {
    box-sizing: border-box;
}

.zf-email-bind-modal[hidden] {
    display: none;
}

.zf-email-bind-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(11, 16, 32, 0.64);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.zf-email-bind-modal__dialog {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 24px;
    background: #fff;
    color: #101828;
    box-shadow: 0 30px 90px rgba(4, 12, 32, 0.36);
    animation: zf-email-bind-modal-enter 0.2s ease-out;
}

.zf-email-bind-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #e4e7ec;
    border-radius: 50%;
    background: #fff;
    color: #667085;
    cursor: pointer;
}

.zf-email-bind-modal__close:hover {
    background: #f2f4f7;
    color: #101828;
}

.zf-email-bind-modal__icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin-bottom: 16px;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffcf33, #f59e0b);
    color: #fff;
    font-size: 24px;
    font-weight: 800;
}

.zf-email-bind-modal__title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.zf-email-bind-modal__description {
    margin: 10px 0 22px;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
}

.zf-email-bind-modal__message {
    min-height: 0;
    margin: -8px 0 14px;
    font-size: 13px;
    line-height: 1.5;
}

.zf-email-bind-modal__message.is-error {
    color: #b42318;
}

.zf-email-bind-modal__message.is-success {
    color: #027a48;
}

.zf-email-bind-modal__label {
    display: block;
    margin: 0 0 8px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.zf-email-bind-modal__email-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.zf-email-bind-modal__input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
    color: #101828;
    font-size: 14px;
    outline: none;
}

.zf-email-bind-modal__input:focus {
    border-color: #7f56d9;
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.14);
}

.zf-email-bind-modal__send,
.zf-email-bind-modal__cancel,
.zf-email-bind-modal__submit {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.zf-email-bind-modal__send,
.zf-email-bind-modal__cancel {
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #344054;
}

.zf-email-bind-modal__send:hover,
.zf-email-bind-modal__cancel:hover {
    background: #f9fafb;
}

.zf-email-bind-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.zf-email-bind-modal__submit {
    border: 1px solid #f59e0b;
    background: linear-gradient(145deg, #ffcf33, #f59e0b);
    color: #392500;
}

.zf-email-bind-modal button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

.zf-email-bind-modal button:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.28);
    outline-offset: 2px;
}

html.dark .zf-email-bind-modal__dialog,
html[data-theme='dark'] .zf-email-bind-modal__dialog {
    border-color: #344054;
    background: #101828;
    color: #f9fafb;
}

html.dark .zf-email-bind-modal__close,
html[data-theme='dark'] .zf-email-bind-modal__close,
html.dark .zf-email-bind-modal__send,
html[data-theme='dark'] .zf-email-bind-modal__send,
html.dark .zf-email-bind-modal__cancel,
html[data-theme='dark'] .zf-email-bind-modal__cancel,
html.dark .zf-email-bind-modal__input,
html[data-theme='dark'] .zf-email-bind-modal__input {
    border-color: #475467;
    background: #1d2939;
    color: #f9fafb;
}

html.dark .zf-email-bind-modal__description,
html[data-theme='dark'] .zf-email-bind-modal__description,
html.dark .zf-email-bind-modal__label,
html[data-theme='dark'] .zf-email-bind-modal__label {
    color: #d0d5dd;
}

@keyframes zf-email-bind-modal-enter {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
    .zf-email-bind-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .zf-email-bind-modal__dialog {
        width: 100%;
        max-height: calc(100vh - 24px);
        padding: 26px 20px 20px;
        border-radius: 22px;
    }

    .zf-email-bind-modal__email-row {
        flex-direction: column;
    }

    .zf-email-bind-modal__send {
        width: 100%;
    }

    .zf-email-bind-modal__actions {
        flex-direction: column-reverse;
    }

    .zf-email-bind-modal__cancel,
    .zf-email-bind-modal__submit {
        width: 100%;
    }
}
