.imc-share {
    --imc-share-accent: var(--imc-color-brand-600, #0f766e);
    --imc-share-accent-hover: var(--imc-color-brand-700, #0d655f);
    --imc-share-surface: var(--imc-surface-raised, #ffffff);
    --imc-share-surface-soft: var(--imc-surface-subtle, #f8fafc);
    --imc-share-text: var(--imc-text-primary, #0f172a);
    --imc-share-muted: var(--imc-text-secondary, #64748b);
    --imc-share-border: var(--imc-border-default, #dbe4ea);
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
    color: var(--imc-share-text);
    font-family: inherit;
}

.imc-share__trigger,
.imc-share__channel,
.imc-share__close {
    appearance: none;
    font: inherit;
}

.imc-share__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--imc-share-accent);
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.18);
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.imc-share__trigger:hover {
    background: var(--imc-share-accent-hover);
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.24);
    transform: translateY(-1px);
}

.imc-share__trigger:active {
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.18);
    transform: translateY(0);
}

.imc-share__trigger:focus-visible,
.imc-share__channel:focus-visible,
.imc-share__close:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--imc-share-accent) 36%, transparent);
    outline-offset: 3px;
}

.imc-share__icon {
    width: 1.2em;
    height: 1.2em;
    flex: 0 0 auto;
    fill: currentColor;
}

.imc-share__counter {
    display: inline-flex;
    min-width: 1.5em;
    min-height: 1.5em;
    align-items: center;
    justify-content: center;
    padding: 0.15em 0.4em;
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 14%, transparent);
    font-size: 0.75em;
    line-height: 1;
}

.imc-share--card {
    display: inline-flex;
    flex-direction: row;
    gap: 0;
}

.imc-share--card .imc-share__trigger {
    min-width: 0;
    min-height: 0;
    box-shadow: none;
}

.imc-share--card.has-animation-pulse .imc-share__trigger {
    animation: imc-share-pulse 2s ease-in-out infinite;
}

.imc-share--card.has-animation-lift .imc-share__trigger:hover {
    transform: translateY(-3px);
}

.imc-share--grid-action {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
}

.imc-share--grid-action .imc-share__trigger {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    box-shadow: none;
    font-size: 13px;
    font-weight: 600;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.imc-share--grid-action .imc-share__trigger:hover {
    border-color: #0f766e;
    background: #f0fdfa;
    color: #0f766e;
    box-shadow: none;
}

.imc-share--grid-action .imc-share__trigger:active {
    background: #ecfdf5;
    box-shadow: none;
}

.imc-share__helper {
    color: var(--imc-share-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.imobicore-empty-state {
    padding: 18px;
    border: 1px dashed var(--imc-share-border, #cbd5e1);
    border-radius: 14px;
    color: var(--imc-share-muted, #64748b);
}

.imc-share__modal[hidden],
.imc-share__toast[hidden] {
    display: none;
}

.imc-share__modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 180ms ease;
}

.imc-share__modal.is-open {
    opacity: 1;
}

.imc-share__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(4px);
    cursor: default;
}

.imc-share__panel {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(720px, calc(100vh - 48px));
    overflow-y: auto;
    padding: 30px;
    border: 1px solid color-mix(in srgb, var(--imc-share-border) 82%, transparent);
    border-radius: 24px;
    background: var(--imc-share-surface);
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.28);
    transform: translateY(12px) scale(0.985);
    transition: transform 180ms ease;
}

.imc-share__modal.is-open .imc-share__panel {
    transform: translateY(0) scale(1);
}

.imc-share__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--imc-share-border);
    border-radius: 999px;
    background: var(--imc-share-surface-soft);
    color: var(--imc-share-text);
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.imc-share__heading {
    display: grid;
    gap: 8px;
    padding-right: 42px;
    margin-bottom: 24px;
}

.imc-share__eyebrow {
    color: var(--imc-share-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.imc-share__title {
    margin: 0;
    color: var(--imc-share-text);
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.2;
}

.imc-share__description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--imc-share-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.imc-share__channels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.imc-share__channel {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 12px 15px;
    border: 1px solid var(--imc-share-border);
    border-radius: 14px;
    background: var(--imc-share-surface-soft);
    color: var(--imc-share-text);
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.imc-share__channel:hover {
    border-color: var(--imc-share-accent);
    background: color-mix(in srgb, var(--imc-share-accent) 8%, var(--imc-share-surface));
    color: var(--imc-share-accent);
    transform: translateY(-1px);
}

.imc-share__channel:active {
    transform: translateY(0);
}

.imc-share__channel:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    transform: none;
}

.imc-share__channel .imc-share__icon {
    width: 22px;
    height: 22px;
}

.imc-share__toast {
    position: fixed;
    z-index: 100001;
    right: 24px;
    bottom: 24px;
    max-width: min(380px, calc(100vw - 48px));
    padding: 13px 17px;
    border-radius: 12px;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 16px 36px rgba(2, 6, 23, 0.28);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.imc-share__toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.imc-share__toast.is-error {
    background: #991b1b;
}

.imc-share-modal-open {
    overflow: hidden;
}

.imc-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 767px) {
    .imc-share__modal {
        align-items: end;
        padding: 0;
    }

    .imc-share__panel {
        width: 100%;
        max-height: 88vh;
        padding: 26px 20px calc(24px + env(safe-area-inset-bottom));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 24px 24px 0 0;
        transform: translateY(24px);
    }

    .imc-share__channels {
        grid-template-columns: 1fr;
    }

    .imc-share__toast {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        max-width: calc(100vw - 32px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .imc-share *,
    .imc-share *::before,
    .imc-share *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

@keyframes imc-share-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--imc-share-accent) 32%, transparent);
    }
    50% {
        box-shadow: 0 0 0 8px transparent;
    }
}
