.share-sheet[hidden] {
    display: none !important;
}

.share-sheet {
    position: fixed;
    z-index: 180;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.share-sheet-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(13, 27, 22, .68);
    cursor: default;
}

.share-sheet-panel {
    position: relative;
    width: min(640px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    max-height: min(760px, calc(100dvh - 40px));
    overflow: auto;
    padding: 26px;
    border: 1px solid #dce4df;
    border-radius: 24px;
    color: #17201d;
    background: #fff;
    box-shadow: 0 26px 80px rgba(13, 27, 22, .28);
}

.share-sheet-panel > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.share-sheet-panel h2 {
    margin: 3px 0 6px;
}

.share-sheet-panel header p:not(.eyebrow) {
    margin: 0;
    color: #66736d;
    font-size: 13px;
    line-height: 1.45;
}

.share-sheet-panel .share-native-hint {
    margin-top: 8px;
    max-width: 520px;
    color: #4e5c56;
    font-size: 12px;
}

.share-sheet-close {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 1px solid #dce4df;
    border-radius: 12px;
    background: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.share-destination-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.share-destination-grid > a,
.share-destination-grid > button {
    display: flex;
    min-width: 0;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dce4df;
    border-radius: 14px;
    color: #17201d;
    background: #f8faf8;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.share-destination-grid > a:hover,
.share-destination-grid > button:hover,
.share-destination-grid > a:focus-visible,
.share-destination-grid > button:focus-visible {
    border-color: #6da38e;
    background: #edf7f3;
    outline: 3px solid rgba(20, 95, 77, .13);
}

.share-destination-grid strong,
.share-destination-grid small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-destination-grid strong {
    font-size: 13px;
}

.share-destination-grid small {
    margin-top: 2px;
    color: #66736d;
    font-size: 10px;
}

.share-mark {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: #145f4d;
    font-size: 13px;
    font-weight: 800;
}

.share-copy-button {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #cfdad4;
    border-radius: 13px;
    color: #145f4d;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
}

.share-trigger {
    display: inline-flex !important;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto !important;
    min-width: 44px;
    height: 44px !important;
    padding: 0 13px !important;
    border-color: #b8d6cb !important;
    color: var(--restaurant-surface-ink, #145f4d) !important;
    background: var(--restaurant-surface-soft, #edf5f1) !important;
    font-weight: 800;
    white-space: nowrap;
}

.share-trigger-icon {
    flex: none;
    font-size: 16px;
    line-height: 1;
}

.share-trigger-label {
    font-size: 12px;
    line-height: 1;
}

.product-heading-row {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between;
    gap: 8px;
    margin-top: 0 !important;
}

.product-heading-row h3 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.product-share-button {
    position: relative !important;
    z-index: 4 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto !important;
    min-width: 34px;
    height: 44px !important;
    padding: 0 9px !important;
    border: 1px solid #b8d6cb !important;
    border-radius: 10px !important;
    color: var(--restaurant-surface-ink, #145f4d) !important;
    background: var(--restaurant-surface-soft, #edf5f1) !important;
    box-shadow: none;
    font-weight: 800;
    white-space: nowrap;
}

.product-share-button .share-trigger-icon {
    font-size: 14px;
}

.product-share-button .share-trigger-label {
    font-size: 10px;
}

.share-trigger:focus-visible,
.product-share-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #145f4d;
}

.share-sheet-open {
    overflow: hidden;
}

@media (max-width: 620px) {
    .share-sheet {
        align-items: end;
        padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    }

    .share-sheet-panel {
        width: 100%;
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - max(20px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
        padding: 21px 17px;
        border-radius: 22px;
    }

    .share-destination-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .guest-actions .share-trigger {
        order: -1;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .share-sheet-panel {
        animation: share-sheet-in .18s ease-out;
    }

    @keyframes share-sheet-in {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
