/* Modal v2 - baseado na referência enviada */

* { box-sizing: border-box; }

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none; /* oculto por padrão */
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalv2FadeIn 0.3s ease;
}

.modal-container {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalv2SlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalv2FadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalv2SlideUp {
    from { transform: translateY(60px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Responsive - Mobile */
@media (max-width: 1080px) {
    .modal-overlay {
        align-items: center;
        padding: 20px;
    }

    .modal-container {
        margin: 0 auto;
        width: 92%;
        max-width: 92vw;
        max-height: 90vh;
        border-radius: 22px;
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
    }

    .modal-header {
        padding: 64px 44px 0;
    }

    .business-info {
        gap: 28px;
        margin-bottom: 36px;
    }

    .business-avatar {
        width: 112px;
        height: 112px;
        border-radius: 24px;
        font-size: 40px;
    }

    .business-name {
        font-size: 42px;
        font-weight: 800;
        margin-bottom: 4px;
    }

    .business-status {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .business-rating {
        font-size: 20px;
        gap: 10px;
        margin-top: 0;
    }

    .stars {
        font-size: 20px;
    }

    .tab-content {
        padding: 0 44px 44px;
    }

    .contact-options {
        gap: 28px;
    }

    .contact-option {
        padding: 32px;
        border-radius: 22px;
    }

    .contact-option.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        pointer-events: none;
        background: #f5f5f5;
        border-color: #e0e0e0;
    }

    .option-icon {
        width: 96px;
        height: 96px;
        border-radius: 24px;
        background: transparent;
    }

    .option-icon svg {
        width: 48px;
        height: 48px;
    }

    .option-icon.ride99 {
        padding: 0;
    }
    .option-icon.ride99 .icon-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .option-title {
        font-size: 32px;
        font-weight: 800;
        margin-bottom: 8px;
    }

    .option-subtitle {
        font-size: 22px;
        color: #666;
    }

    .option-arrow {
        width: 36px;
        height: 36px;
        color: #ccc;
    }

    .cancel-section {
        padding: 16px 36px 12px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .cancel-btn {
        padding: 20px 28px;
        font-size: 40px;
        font-weight: 700;
        border-radius: 14px;
        color: #666;
        width: auto;
        min-width: 60%;
        text-align: center;
        margin: 0 auto;
    }

    .modal-footer {
        padding: 8px 16px 8px;
    }

    .footer-text {
        font-size: 12px;
        color: #999;
    }

    .close-btn {
        display: none !important;
    }
}

.modal-header { padding: 16px 16px 0; position: relative; }

.business-info { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.business-avatar {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 16px;
}
.business-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: none; /* exibido via JS quando houver foto_url */
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
}
.business-avatar span {
    display: block; /* ocultado via JS quando houver foto_url */
}
.business-details { flex: 1; }
.business-name { font-size: 16px; color: #1a1a1a; font-weight: 600; display: flex; align-items: center; gap: 6px; margin: 0 0 2px 0; }
.business-status { font-size: 12px; color: #4CAF50; font-weight: 500; display: flex; align-items: center; gap: 4px; }
.status-dot { width: 6px; height: 6px; background: #4CAF50; border-radius: 50%; animation: modalv2Pulse 2s infinite; }
@keyframes modalv2Pulse { 0%,100%{opacity:1;} 50%{opacity:.5;} }
.business-rating { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #666; margin-top: 2px; }
.business-rating .stars { color: #ffd700; }

.close-btn { display: none !important; }

.tab-content { padding: 0 14px 12px; }

.contact-options { display: flex; flex-direction: column; gap: 6px; }
.contact-option {
    display: flex; align-items: center; gap: 12px; padding: 12px;
    border-radius: 12px; border: 1px solid #e9ecef; background: #fff;
    cursor: pointer; transition: all .3s ease; text-decoration: none; color: inherit;
    position: relative; overflow: hidden; opacity: 0; transform: translateY(20px);
    animation: modalv2FadeInUp .4s ease forwards;
}
.contact-option:hover { border-color: #4CAF50; background: #f8fff9; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(76,175,80,.15); }
.contact-option:active { transform: translateY(0); }
.contact-option::after { content:''; position:absolute; top:50%; left:50%; width:0; height:0; border-radius:50%; background: rgba(76,175,80,.2); transform: translate(-50%,-50%); transition: width .6s, height .6s; pointer-events:none; }
.contact-option.ripple::after { width: 300px; height: 300px; }

/* Botões desabilitados (sem dados disponíveis) */
.contact-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: #f5f5f5;
    border-color: #e0e0e0;
}
.contact-option.disabled:hover {
    border-color: #e0e0e0;
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}
.contact-option.disabled .option-title,
.contact-option.disabled .option-subtitle {
    color: #999;
}
.contact-option.disabled .option-icon {
    opacity: 0.5;
}

.option-icon { width: 40px; height: 40px; border-radius: 10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; position:relative; background: transparent; }
.option-icon.whatsapp { background: transparent; }
.option-icon.phone    { background: transparent; }
.option-icon.location { background: transparent; }
.option-icon.website  { background: transparent; }
.option-icon.ride99   { background: transparent; }
.option-icon svg { width: 24px; height: 24px; color: #fff; fill: currentColor; }
.option-icon .icon-image { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    border-radius: 0;
    display: block;
}

.option-text { flex: 1; }
.option-title { font-size: 15px; font-weight: 600; color: #1a1a1a; margin: 0 0 2px 0; }
.option-subtitle { font-size: 13px; color: #666; margin: 0; line-height: 1.3; }

.option-arrow { width: 18px; height: 18px; color: #ccc; transition: all .3s ease; }
.contact-option:hover .option-arrow { color: #4CAF50; transform: translateX(4px); }

.cancel-section { padding: 10px 14px; border-top: 1px solid #f0f0f0; }
.cancel-btn { width: 100%; padding: 10px; border: none; background: #f8f9fa; color: #666; font-size: 14px; font-weight: 500; border-radius: 8px; cursor: pointer; transition: all .2s ease; }
.cancel-btn:hover { background: #e9ecef; color: #333; }
.cancel-btn:active { transform: scale(0.98); }

.modal-footer { padding: 8px 14px; background: #f8f9fa; text-align: center; border-top: 1px solid #e9ecef; }
.footer-text { font-size: 10px; color: #999; margin: 0; }
.footer-link { color: #4CAF50; text-decoration: none; font-weight: 500; }

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

