/* ===========================================
   Modal de Compartilhamento/Indicação
   =========================================== */

/* Overlay do modal */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Container do modal */
.share-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.share-modal-overlay.active .share-modal {
    transform: scale(1) translateY(0);
}

/* Header do modal */
.share-modal-header {
    background: linear-gradient(135deg, #7B9F7E 0%, #5a7d5d 100%);
    color: #fff;
    padding: 25px 20px;
    text-align: center;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.share-modal-header .share-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.share-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.share-modal-header p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

/* Botão fechar */
.share-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.share-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Corpo do modal */
.share-modal-body {
    padding: 25px 20px;
}

/* Opções de compartilhamento */
.share-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.share-option:hover {
    border-color: #7B9F7E;
    background: #f8faf8;
    transform: translateX(5px);
}

.share-option-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.share-option-icon.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.share-option-icon.copy {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.share-option-icon.native {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.share-option-icon.qrcode {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.share-option-text {
    flex: 1;
}

.share-option-text strong {
    display: block;
    font-size: 1rem;
    color: #333;
    margin-bottom: 2px;
}

.share-option-text span {
    font-size: 0.85rem;
    color: #777;
}

.share-option-arrow {
    color: #ccc;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.share-option:hover .share-option-arrow {
    transform: translateX(3px);
    color: #7B9F7E;
}

/* Footer do modal */
.share-modal-footer {
    padding: 15px 20px 25px;
    text-align: center;
    border-top: 1px solid #eee;
}

.share-modal-footer label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
}

.share-modal-footer input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #7B9F7E;
    cursor: pointer;
}

/* Feedback de cópia */
.copy-feedback {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.95rem;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.copy-feedback.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.copy-feedback i {
    margin-right: 8px;
    color: #4CAF50;
}

/* QR Code container */
.qr-code-container {
    display: none;
    text-align: center;
    padding: 20px;
}

.qr-code-container.active {
    display: block;
}

.qr-code-container canvas,
.qr-code-container img {
    max-width: 200px;
    margin: 0 auto 15px;
    display: block;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.qr-code-container p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.qr-back-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: #7B9F7E;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.qr-back-btn:hover {
    background: #5a7d5d;
}

/* Botão de compartilhar no menu */
.share-app-menu {
    display: block !important;
}

.share-app-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7B9F7E !important;
    font-weight: 500;
}

.share-app-menu a:hover {
    color: #5a7d5d !important;
}

/* Botão flutuante de compartilhar */
.share-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #7B9F7E 0%, #5a7d5d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(123, 159, 126, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
}

.share-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(123, 159, 126, 0.5);
}

.share-fab.pulse {
    animation: fabPulse 2s infinite;
}

@keyframes fabPulse {
    0% {
        box-shadow: 0 4px 15px rgba(123, 159, 126, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(123, 159, 126, 0.7);
    }
    100% {
        box-shadow: 0 4px 15px rgba(123, 159, 126, 0.4);
    }
}

/* Responsivo */
@media (max-width: 480px) {
    .share-modal {
        width: 95%;
        max-width: none;
        margin: 10px;
    }
    
    .share-modal-header {
        padding: 20px 15px;
    }
    
    .share-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .share-modal-body {
        padding: 20px 15px;
    }
    
    .share-option {
        padding: 12px 15px;
    }
    
    .share-option-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .share-fab {
        bottom: 80px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
