/* ---- Share Modal (scoped with .share-modal prefix) ---- */
.share-modal {
    --sm-primary: #00635a;
    --sm-primary-light: #e6f2f0;
    --sm-accent: #f59e0b;
    --sm-gray-100: #f3f4f6;
    --sm-gray-200: #e5e7eb;
    --sm-gray-600: #6b7280;
    --sm-white: #fff;
    --sm-radius: 12px;
    --sm-shadow: 0 1px 3px rgba(0,0,0,.1);
    --sm-shadow-lg: 0 4px 12px rgba(0,0,0,.12);

    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.share-modal--open {
    display: flex;
}

.share-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.share-modal__dialog {
    position: relative;
    background: var(--sm-white);
    border-radius: var(--sm-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    margin: 20px;
    animation: shareModalSlideIn 0.25s ease-out;
    overflow: hidden;
}

@keyframes shareModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.share-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--sm-gray-200);
}

.share-modal__title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.share-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--sm-gray-100);
    border-radius: 50%;
    color: var(--sm-gray-600);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.share-modal__close:hover {
    background: var(--sm-gray-200);
    color: #1f2937;
}

.share-modal__body {
    padding: 24px;
}

/* ---- Share button grid ---- */
.share-modal__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.share-modal__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border: none;
    border-radius: 10px;
    background: var(--sm-gray-100);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.share-modal__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-modal__btn:active {
    transform: translateY(0);
}

.share-modal__btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sm-white);
}

.share-modal__btn-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

/* Platform colors */
.share-modal__btn--facebook .share-modal__btn-icon {
    background: #1877f2;
}
.share-modal__btn--facebook:hover {
    background: #e8f0fe;
}

.share-modal__btn--twitter .share-modal__btn-icon {
    background: #000000;
}
.share-modal__btn--twitter:hover {
    background: #f0f0f0;
}

.share-modal__btn--whatsapp .share-modal__btn-icon {
    background: #25d366;
}
.share-modal__btn--whatsapp:hover {
    background: #e7f9ee;
}

.share-modal__btn--telegram .share-modal__btn-icon {
    background: #0088cc;
}
.share-modal__btn--telegram:hover {
    background: #e5f3fa;
}

/* ---- Copy link ---- */
.share-modal__copy {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.share-modal__copy-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--sm-gray-200);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: #374151;
    background: var(--sm-gray-100);
    min-width: 0;
    outline: none;
    transition: border-color 0.2s;
}

.share-modal__copy-input:focus {
    border-color: var(--sm-primary);
}

.share-modal__copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: var(--sm-primary);
    color: var(--sm-white);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.share-modal__copy-btn:hover {
    background: #004d44;
}

.share-modal__copy-btn--copied {
    background: #16a34a !important;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .share-modal__dialog {
        margin: 12px;
    }
    .share-modal__body {
        padding: 20px 16px;
    }
    .share-modal__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .share-modal__btn {
        padding: 12px 4px;
    }
    .share-modal__btn-icon {
        width: 40px;
        height: 40px;
    }
    .share-modal__btn-label {
        font-size: 11px;
    }
    .share-modal__copy {
        flex-direction: column;
    }
    .share-modal__copy-btn {
        justify-content: center;
    }
}
