/*---------------------------------------
  DETALHES.CSS — UC17/UC18: Tooltip e Ver Informações Completas
-----------------------------------------*/

/* ==================== TOOLTIP (UC17) ==================== */
.bv-tooltip-wrapper {
    position: absolute;
    z-index: 9999;
    pointer-events: none;
}

.bv-tooltip-card {
    background: white;
    border-radius: var(--border-radius-small);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 0;
    width: 260px;
    pointer-events: auto;
    border: 1px solid #eee;
    overflow: hidden;
    animation: tooltipIn 0.15s ease;
}

@keyframes tooltipIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.bv-tooltip-card .tooltip-tipo-bar {
    height: 4px;
}

.bv-tooltip-card .tooltip-tipo-bar.evento {
    background: #dc3545;
}

.bv-tooltip-card .tooltip-tipo-bar.ponto {
    background: #198754;
}

.bv-tooltip-body {
    padding: 14px 16px;
}

.bv-tooltip-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    margin-bottom: 8px;
}

.bv-tooltip-badge.evento {
    background: #fde8e8;
    color: #dc3545;
}

.bv-tooltip-badge.ponto {
    background: #e8f5e9;
    color: #198754;
}

.bv-tooltip-nome {
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    color: var(--dark-color);
    margin-bottom: 8px;
    line-height: 1.3;
}

.bv-tooltip-linha {
    font-size: 12px;
    color: #777;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
}

.bv-tooltip-linha i {
    color: var(--accent-color);
    font-size: 11px;
}

.bv-tooltip-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.bv-tooltip-footer a {
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.bv-tooltip-footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.bv-tooltip-footer .btn-tooltip-rota {
    margin-left: auto;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.bv-tooltip-footer .btn-tooltip-rota:hover {
    background: var(--primary-color);
}

/* ==================== PÁGINA DETALHES (UC18) ==================== */
.detalhes-section {
    padding: 40px 0 60px;
    background-color: var(--section-bg-color);
    min-height: calc(100vh - 80px);
}

/* Breadcrumb */
.detalhes-breadcrumb {
    margin-bottom: 24px;
}

.detalhes-breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.detalhes-breadcrumb a:hover {
    color: var(--primary-color);
}

.detalhes-breadcrumb span {
    font-size: 14px;
    color: #888;
    margin: 0 6px;
}

.detalhes-breadcrumb .atual {
    font-size: 14px;
    color: #444;
}

/* Hero da página de detalhes */
.detalhes-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: var(--border-radius-medium);
    overflow: hidden;
    position: relative;
    margin-bottom: 32px;
    min-height: 280px;
    display: flex;
    align-items: flex-end;
}

.detalhes-hero-img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.detalhes-hero-content {
    position: relative;
    z-index: 1;
    padding: 32px;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.detalhes-hero-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: var(--font-weight-bold);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detalhes-hero-badge.evento {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.detalhes-hero-badge.ponto {
    background: rgba(25, 135, 84, 0.9);
    color: white;
}

.detalhes-hero-titulo {
    font-size: var(--h2-font-size);
    font-weight: var(--font-weight-bold);
    color: white;
    margin-bottom: 0;
}

/* Coluna principal */
.detalhes-corpo {
    background: white;
    border-radius: var(--border-radius-medium);
    padding: 32px;
    border: 1px solid #e9ecef;
    margin-bottom: 24px;
}

.detalhes-corpo h4 {
    font-size: var(--h5-font-size);
    font-weight: var(--font-weight-bold);
    color: var(--dark-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.detalhes-corpo p {
    font-size: var(--p-font-size);
    color: #555;
    line-height: 1.7;
}

/* Coluna de metadados */
.detalhes-meta-card {
    background: white;
    border-radius: var(--border-radius-medium);
    padding: 24px;
    border: 1px solid #e9ecef;
    margin-bottom: 16px;
}

.detalhes-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.detalhes-meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detalhes-meta-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.detalhes-meta-icon.vermelho {
    background: #fde8e8;
    color: #dc3545;
}

.detalhes-meta-icon.verde {
    background: #e8f5e9;
    color: #198754;
}

.detalhes-meta-icon.laranja {
    background: #fff3cd;
    color: #fd7e14;
}

.detalhes-meta-icon.cinza {
    background: #e7e7e7;
    color: #3f3f3f;
}

.detalhes-meta-icon.azul {
    background: #e8f4ff;
    color: #0d6efd;
}

.detalhes-meta-texto-label {
    font-size: 11px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: var(--font-weight-medium);
    margin-bottom: 2px;
}

.detalhes-meta-texto-valor {
    font-size: 14px;
    color: var(--dark-color);
    font-weight: var(--font-weight-medium);
}

/* Botão de rota */
.btn-detalhes-rota {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-color), #ff416c);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 15px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    margin-bottom: 8px;
}

.btn-detalhes-rota:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.btn-detalhes-voltar {
    width: 100%;
    padding: 11px;
    background: white;
    color: #555;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-small);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-detalhes-voltar:hover {
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
}

.btn-detalhes-avaliar {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), #ffc93e);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 15px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    margin-bottom: 8px;
}

.btn-detalhes-avaliar:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

/* Galeria */
.detalhes-galeria {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.galeria-item {
    aspect-ratio: 1;
    background: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.galeria-item:hover {
    transform: scale(1.03);
}

.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==================== MODAL DE ROTA (UC19) ==================== */
.modal-rota-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-rota-overlay.aberto {
    opacity: 1;
    pointer-events: auto;
}

.modal-rota-card {
    background: white;
    border-radius: var(--border-radius-medium);
    padding: 32px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.2s;
}

.modal-rota-overlay.aberto .modal-rota-card {
    transform: translateY(0);
}

.modal-rota-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.modal-rota-card h5 {
    font-weight: var(--font-weight-bold);
    margin-bottom: 8px;
    color: var(--dark-color);
}

.modal-rota-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-rota-destino {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.modal-rota-destino i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.modal-rota-destino strong {
    font-size: 14px;
    display: block;
    color: var(--dark-color);
}

.modal-rota-destino small {
    font-size: 12px;
    color: #888;
}

.modal-rota-botoes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-abrir-maps {
    padding: 12px;
    background: #4285F4;
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 14px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-abrir-maps:hover {
    background: #3367d6;
    color: white;
    text-decoration: none;
}

.btn-cancelar-rota {
    padding: 11px;
    background: white;
    color: #555;
    border: 1px solid #ced4da;
    border-radius: var(--border-radius-small);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancelar-rota:hover {
    background: #f8f9fa;
}

/* ==================== RESPONSIVO ==================== */
@media (max-width: 768px) {
    .detalhes-hero {
        min-height: 200px;
    }

    .detalhes-hero-titulo {
        font-size: var(--h3-font-size);
    }

    .detalhes-corpo {
        padding: 20px;
    }

    .detalhes-galeria {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Container de rolagem das avaliações */
.detalhes-avaliacoes-lista {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 6px; /* Espaço para a barra de rolagem */
    margin-bottom: 8px;
}

/* Estilização da barra de rolagem (opcional) */
.detalhes-avaliacoes-lista::-webkit-scrollbar {
    width: 5px;
}

.detalhes-avaliacoes-lista::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.detalhes-avaliacoes-lista::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.detalhes-avaliacoes-lista::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* ==================== PATROCINADORES ==================== */
.patrocinadores-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centraliza os itens na horizontal */
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.patrocinador-item {
    /* No máximo 4 por linha (25% menos o desconto dos gaps) */
    flex: 0 0 calc(25% - 12px);
    max-width: calc(25% - 12px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    box-sizing: border-box;
}

.patrocinador-item img {
    max-width: 120px;  /* Limite de largura da imagem */
    max-height: 80px;  /* Limite de altura da imagem */
    width: auto;
    height: auto;
    object-fit: contain; /* Preserva a proporção original */
    transition: transform 0.2s;
}

.patrocinador-item img:hover {
    transform: scale(1.05);
}

/* Responsividade */
@media (max-width: 768px) {
    .patrocinador-item {
        flex: 0 0 calc(50% - 12px); /* Até 2 por linha em tablets */
        max-width: calc(50% - 12px);
    }
}

@media (max-width: 480px) {
    .patrocinador-item {
        flex: 0 0 100%; /* 1 por linha em celulares */
        max-width: 100%;
    }
}
