.attachment-action-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 16px;
}

.attachment-action-modal[hidden] {
    display: none;
}

.attachment-action-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.56);
    backdrop-filter: blur(10px);
}

.attachment-action-modal-panel {
    position: relative;
    z-index: 1;
    isolation: isolate;
    display: grid;
    gap: 12px;
    width: min(100%, 620px);
    max-height: min(720px, calc(100dvh - 32px));
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--zn-member-border-bright);
    border-radius: 8px;
    background:
        linear-gradient(var(--zn-member-bg-card), var(--zn-member-bg-card)),
        var(--zn-member-bg-app, #0b111a);
    color: var(--zn-member-text-primary);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 color-mix(in srgb, var(--zn-member-bg-surface-active) 70%, transparent);
}

.attachment-action-modal-panel strong {
    color: var(--zn-member-text-primary);
}

.attachment-action-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.attachment-action-modal-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    border: 1px solid var(--zn-member-border-bright);
    border-radius: 8px;
    background:
        linear-gradient(var(--zn-member-bg-surface-active), var(--zn-member-bg-surface-active)),
        var(--zn-member-bg-card);
    color: var(--zn-attachment-action-modal-close-text, var(--zn-member-text-primary));
}

.attachment-action-modal-header button svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.attachment-action-modal-copy,
.attachment-action-modal-status {
    margin: 0;
    color: var(--zn-member-text-secondary);
    font-size: 0.88rem;
}

@media (max-width: 760px) {
    .attachment-action-modal {
        place-items: end center;
        padding: 12px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .attachment-action-modal-panel {
        width: 100%;
        max-height: min(620px, calc(100dvh - 24px));
    }

    .attachment-action-modal-panel[data-message-share-form] [data-message-share-message] {
        min-height: 68px;
        height: 68px;
        resize: none;
    }
}
