/* ════════════════════ SHARE MODAL ════════════════════ */

/* Botão Compartilhar no Header */
.btn-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(199, 122, 58, 0.2), rgba(245, 158, 11, 0.15));
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
    font-family: 'Space Grotesk', sans-serif;
}

.btn-share:hover {
    background: linear-gradient(135deg, rgba(199, 122, 58, 0.3), rgba(245, 158, 11, 0.25));
    border-color: rgba(245, 158, 11, 0.7);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.3);
}

.btn-share svg {
    flex-shrink: 0;
}

/* Responsivo - esconde texto em mobile, mantem apenas ícones */
@media (max-width: 640px) {
    .btn-share-text {
        display: none;
    }

    .btn-share {
        padding: 0.5rem 0.6rem;
        gap: 0.4rem;
    }

    .btn-share svg:first-child {
        order: 1;
    }

    .btn-share svg:last-child {
        order: 2;
    }
}

/* Modal Overlay */
.share-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    padding: 1rem;
    animation: shareFadeIn 0.3s ease;
}

.share-modal-overlay.active {
    display: flex;
}

@keyframes shareFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal Content */
.share-modal-content {
    background: linear-gradient(135deg, #111118 0%, #0a0a0f 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    max-width: 480px;
    width: 100%;
    position: relative;
    padding: 2rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: shareSlideUp 0.4s ease;
}

@keyframes shareSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botão Fechar */
.share-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* Título do Modal */
.share-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.share-modal-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 0 0 2rem 0;
}

/* Card Preview (WhatsApp Style) */
.share-card-preview {
    background: rgba(17, 17, 24, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.share-card-preview:hover {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.1);
}

.share-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(199, 122, 58, 0.2), rgba(10, 10, 15, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.share-card-image img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(245, 158, 11, 0.3));
}

.share-card-body {
    padding: 1.25rem;
}

.share-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.share-card-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}

.share-card-url {
    font-size: 0.8rem;
    color: #f59e0b;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Botões de Compartilhamento */
.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
}

.share-btn .material-icons {
    font-size: 1.2rem;
}

.share-btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
}

.share-btn-whatsapp:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.share-btn-telegram {
    background: linear-gradient(135deg, #0088cc, #229ed9);
    color: #fff;
}

.share-btn-telegram:hover {
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    transform: translateY(-2px);
}

.share-btn-copy {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.share-btn-copy:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

.share-btn-native {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.share-btn-native:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

/* CTA Instalar PWA */
.share-pwa-cta {
    background: linear-gradient(135deg, rgba(199, 122, 58, 0.1), rgba(245, 158, 11, 0.08));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
}

.share-pwa-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1rem 0;
}

.share-pwa-text span {
    color: #f59e0b;
    font-weight: 700;
}

.share-pwa-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, #c77a3a, #f59e0b);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
}

.share-pwa-btn:hover {
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

/* Toast de Compartilhamento (Link copiado) */
.share-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #111118, #0a0a0f);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 3000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-toast.show {
    transform: translateX(-50%) translateY(0);
}

.share-toast .material-icons {
    color: #25d366;
}

/* Toast Opcional (após 60s) */
.share-prompt-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #111118, #0a0a0f);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 12px;
    padding: 1.25rem;
    max-width: 320px;
    z-index: 1500;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: sharePromptSlide 0.5s ease;
}

@keyframes sharePromptSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-prompt-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.share-prompt-toast-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.share-prompt-toast-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.share-prompt-toast-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.share-prompt-toast-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.share-prompt-toast-btn {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(135deg, #c77a3a, #f59e0b);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    font-family: 'Space Grotesk', sans-serif;
}

.share-prompt-toast-btn:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

/* Responsivo */
@media (max-width: 640px) {
    .share-modal-overlay {
        padding: 0.5rem;
        align-items: flex-end;
        justify-content: center;
    }

    .share-modal-content {
        padding: 1.25rem 1rem 1.5rem;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        animation: shareSlideUpMobile 0.3s ease;
    }

    @keyframes shareSlideUpMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .share-modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 28px;
        height: 28px;
    }

    .share-modal-title {
        font-size: 1.2rem;
        padding-right: 2rem;
    }

    .share-modal-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
    }

    .share-card-preview {
        margin-bottom: 1.25rem;
    }

    .share-card-image {
        height: 140px;
    }

    .share-card-image img {
        max-width: 90px;
        max-height: 90px;
    }

    .share-card-body {
        padding: 1rem;
    }

    .share-card-title {
        font-size: 1rem;
    }

    .share-card-description {
        font-size: 0.85rem;
    }

    .share-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .share-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        flex-direction: column;
        gap: 0.3rem;
    }

    .share-btn svg {
        width: 18px;
        height: 18px;
    }

    .share-pwa-cta {
        padding: 1rem;
    }

    .share-pwa-text {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .share-pwa-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }

    .share-prompt-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
    }

    .share-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
        justify-content: center;
    }
}

/* iPhone notch fix */
@supports (padding: max(0px)) {
    @media (max-width: 640px) {
        .share-modal-content {
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
            padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
        }
    }
}