.wm-mail-send {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wm-mail-send__meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.75rem;
    background: rgb(249 250 251);
}

.wm-mail-send__toolbar {
    flex-direction: row;
    align-items: flex-end;
    gap: 0.75rem 1rem;
}

.wm-mail-send__field--grow {
    flex: 1;
    min-width: 0;
}

.wm-mail-send__actions {
    flex-shrink: 0;
}

.wm-mail-send__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 0.5rem;
    background: rgb(217 119 6);
    color: rgb(255 255 255);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.wm-mail-send__submit:hover:not(:disabled) {
    background: rgb(180 83 9);
}

.wm-mail-send__submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgb(217 119 6 / 0.35);
}

.wm-mail-send__submit:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.wm-mail-send__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wm-mail-send__label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgb(55 65 81);
    letter-spacing: 0.01em;
}

.wm-mail-send__select-wrap {
    position: relative;
    display: block;
}

.wm-mail-send__select {
    display: block;
    width: 100%;
    min-height: 2.5rem;
    padding: 0.5rem 2.25rem 0.5rem 0.75rem;
    border: 1px solid rgb(209 213 219);
    border-radius: 0.5rem;
    background-color: rgb(255 255 255);
    color: rgb(17 24 39);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wm-mail-send__select:hover {
    border-color: rgb(156 163 175);
}

.wm-mail-send__select:focus {
    outline: none;
    border-color: rgb(217 119 6);
    box-shadow: 0 0 0 3px rgb(217 119 6 / 0.2);
}

.wm-mail-send__select-icon {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    width: 1.1rem;
    height: 1.1rem;
    color: rgb(107 114 128);
    pointer-events: none;
    transform: translateY(-50%);
}

.wm-mail-send__section-title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgb(55 65 81);
    letter-spacing: 0.01em;
}

.wm-mail-send__recipients {
    overflow: hidden;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.65rem;
    background: rgb(255 255 255);
}

.wm-mail-send__recipient {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid rgb(243 244 246);
}

.wm-mail-send__recipient:last-child {
    border-bottom: 0;
}

.wm-mail-send__recipient-name {
    font-weight: 600;
    color: rgb(17 24 39);
}

.wm-mail-send__recipient-meta {
    color: rgb(75 85 99);
    text-align: right;
}

.wm-mail-send__recipient-locale {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgb(120 53 15);
    background: rgb(254 243 199);
}

.wm-mail-send__empty {
    margin: 0;
    font-size: 0.875rem;
    color: rgb(107 114 128);
}

.wm-mail-send__alert {
    padding: 0.65rem 0.85rem;
    border: 1px solid rgb(252 211 77);
    border-radius: 0.65rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgb(120 53 15);
    background: rgb(255 251 235);
}

.wm-mail-send__subject-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wm-mail-send__subject {
    margin: 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.65rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgb(31 41 55);
    background: rgb(255 255 255);
    word-break: break-word;
}

.wm-mail-send__hint {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgb(107 114 128);
}

.wm-mail-send__preview-panel {
    position: relative;
    min-height: 8rem;
}

.wm-mail-send__recipients--spaced {
    margin-top: 0.5rem;
}

.wm-mail-send__empty--spaced {
    margin-top: 0.35rem;
}

.wm-mail-send__preview-block {
    margin-top: 1rem;
}

.wm-mail-send__preview-heading {
    margin: 0 0 0.5rem;
}

.wm-mail-send__loading {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 10;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    background: rgb(255 255 255 / 0.88);
}

.wm-mail-send__loading--active {
    display: flex;
}

.wm-mail-send__content--loading {
    pointer-events: none;
    opacity: 0.4;
}

.wm-mail-send__loading-spinner {
    width: 2rem;
    height: 2rem;
    color: rgb(217 119 6);
    animation: wm-mail-send-spin 0.8s linear infinite;
}

.wm-mail-send__loading-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgb(55 65 81);
}

.wm-mail-send__preview-frame-wrap {
    overflow: hidden;
    border: 1px solid rgb(229 231 235);
    border-radius: 0.75rem;
    background: rgb(243 244 246);
}

.wm-mail-send__preview-frame-wrap .mail-preview-frame {
    margin-inline: auto;
    max-width: 560px;
    background: rgb(255 255 255);
}

@keyframes wm-mail-send-spin {
    to {
        transform: rotate(360deg);
    }
}

.dark .wm-mail-send__submit {
    background: rgb(217 119 6);
    color: rgb(255 255 255);
}

.dark .wm-mail-send__submit:hover:not(:disabled) {
    background: rgb(180 83 9);
}

.dark .wm-mail-send__meta {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
}

.dark .wm-mail-send__label,
.dark .wm-mail-send__section-title {
    color: rgb(209 213 219);
}

.dark .wm-mail-send__select {
    border-color: rgb(75 85 99);
    background-color: rgb(31 41 55);
    color: rgb(243 244 246);
    box-shadow: none;
}

.dark .wm-mail-send__select:hover {
    border-color: rgb(107 114 128);
}

.dark .wm-mail-send__recipients {
    border-color: rgb(55 65 81);
    background: rgb(31 41 55);
}

.dark .wm-mail-send__recipient {
    border-bottom-color: rgb(55 65 81);
}

.dark .wm-mail-send__recipient-name {
    color: rgb(243 244 246);
}

.dark .wm-mail-send__recipient-meta {
    color: rgb(156 163 175);
}

.dark .wm-mail-send__recipient-locale {
    color: rgb(254 243 199);
    background: rgb(120 53 15 / 0.45);
}

.dark .wm-mail-send__subject {
    border-color: rgb(55 65 81);
    color: rgb(229 231 235);
    background: rgb(31 41 55);
}

.dark .wm-mail-send__loading {
    background: rgb(17 24 39 / 0.9);
}

.dark .wm-mail-send__loading-text {
    color: rgb(209 213 219);
}

.dark .wm-mail-send__preview-frame-wrap {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
}
