/* ===== Share modal (port dari theme Teesful) ===== */
.share-toast {
    position: fixed;
    left: 50%;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    background: #15171a;
    color: #fff;
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    z-index: 30000;
    word-break: break-all;
    text-align: center;
}

.share-modal-overlay {
    /* jarak dari bawah = tinggi bar navigasi bawah (.fixed-container) + celah */
    --share-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px 14px var(--share-bottom);
    z-index: 30000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 768px) {
    .share-modal-overlay {
        --share-bottom: 20px;
        align-items: center;
    }
}
.share-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}
body.share-modal-open {
    overflow: hidden;
}

.share-modal {
    background: #fff;
    color: #15171a;
    width: 100%;
    max-width: 340px;
    max-height: calc(100dvh - var(--share-bottom) - 24px);
    overflow-y: auto;
    border-radius: 16px;
    padding: 14px 20px 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.share-modal-overlay.is-open .share-modal {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .share-modal-overlay,
    .share-modal-overlay .share-modal { transition: none; }
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.share-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}
.share-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    border-radius: 6px;
}

/* Gambar: square, selebar kartu (menutupi padding kiri-kanan) */
.share-modal-image {
    width: calc(100% + 40px);
    margin: 0 -20px 10px;
    aspect-ratio: 1 / 1;
    max-height: max(160px, calc(100dvh - var(--share-bottom) - 24px - 180px));
    overflow: hidden;
    background: #fff;
}
.share-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.share-modal-body {
    margin-bottom: 12px;
}
.share-modal-item-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.share-modal-item-url {
    display: none;
}

/* Baris ikon: 4 ikon penuh, sisanya bisa digeser */
.share-modal-actions-wrap {
    position: relative;
}
.share-modal-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow-x: auto;
    padding: 2px;
    margin: 0 -2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.share-modal-actions::-webkit-scrollbar {
    display: none;
}
.share-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    width: calc((100% - 36px) / 4);
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    font: inherit;
}
.share-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex: 0 0 auto;
}
.share-icon-label {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.55);
    text-align: center;
    white-space: nowrap;
}
.share-icon-copy      { background: #e5e7eb; color: #4b5563; }
.share-icon-twitter   { background: #000; }
.share-icon-facebook  { background: #1877f2; }
.share-icon-whatsapp  { background: #25d366; }
.share-icon-linkedin  { background: #0a66c2; }
.share-icon-messenger { background: linear-gradient(135deg, #00c6ff, #7847e8 50%, #ff5679); }
.share-icon-snapchat  { background: #fffc00; }
.share-icon-email     { background: #6b7280; }
.share-icon-more      { background: #e5e7eb; color: #4b5563; }
.share-icon-photo     { background: #e5e7eb; color: #4b5563; }

.share-scroll-btn {
    position: absolute;
    top: 24px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    color: #15171a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease;
    z-index: 2;
}
.share-scroll-right { right: -17px; }
.share-scroll-left  { left: -17px; }
.share-modal-actions-wrap:hover .share-scroll-btn {
    opacity: 1;
    visibility: visible;
}
.share-scroll-btn.is-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}