/* --- ESTILOS GERAIS E DO MAPA --- */
html, body {
    height: 100%; margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f6f9;
}
#map-container { position: relative; width: 100%; height: 100%; z-index: 1; }
#map { height: 100%; width: 100%; background-color: #f0f0f0; }
#search-button {
    position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
    z-index: 1000; padding: 10px 15px; background-color: #fff; color: #333;
    border: 2px solid #ccc; border-radius: 5px; font-weight: bold; cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); display: none;
}

/* --- ESTILOS DO MENU FLUTUANTE (FAB) --- */
.fab-container { position: absolute; top: 20px; left: 20px; z-index: 1001; }
.fab-main-button { width: 60px; height: 60px; background-color: #00bcd4; color: white; border-radius: 50%; border: none; box-shadow: 0 4px 12px rgba(0,0,0,0.3); cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; transition: all 0.2s ease-in-out; }
.fab-main-button:hover { background-color: #0097a7; transform: scale(1.05); }
.fab-options { position: absolute; top: 0; left: 0; list-style: none; padding: 0; margin: 0; }
.fab-options .fab-option a { width: 45px; height: 45px; background-color: #00bcd4; color: white; border-radius: 50%; box-shadow: 0 2px 8px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 20px; position: absolute; top: 8px; left: 8px; opacity: 0; transform: scale(0.5); transition: all 0.2s ease-out; pointer-events: none; }
.fab-container.active .fab-options .fab-option a { opacity: 1; transform: scale(1); pointer-events: auto; }
.fab-container.active .fab-options .fab-option:nth-child(1) a { transform: translate(75px, 0); transition-delay: 0.0s; }
.fab-container.active .fab-options .fab-option:nth-child(2) a { transform: translate(130px, 0); transition-delay: 0.05s; }
.fab-container.active .fab-options .fab-option:nth-child(3) a { transform: translate(185px, 0); transition-delay: 0.1s; }
.fab-container.active .fab-options .fab-option:nth-child(4) a { transform: translate(240px, 0); transition-delay: 0.15s; }
.hamburger { width: 25px; height: 3px; background: white; display: block; position: absolute; transition: transform 200ms ease-in-out; }
.hamburger-1 { transform: translateY(-8px); }
.hamburger-2 { transform: translateY(0); }
.hamburger-3 { transform: translateY(8px); }
.fab-container.active .fab-main-button .hamburger-1 { transform: translateY(0) rotate(45deg); }
.fab-container.active .fab-main-button .hamburger-2 { transform: scaleX(0); }
.fab-container.active .fab-main-button .hamburger-3 { transform: translateY(0) rotate(-45deg); }

/* --- OUTROS ESTILOS DE CONTROLES --- */
.leaflet-control-custom {
    background-color: white;
    padding: 5px 8px;
    font-size: 14px;
    text-decoration: none;
    color: #333;
    cursor: pointer;
}
.leaflet-control-category-filter { 
    display: flex; 
    gap: 5px; 
    flex-wrap: wrap; 
    max-width: calc(100vw - 80px); 
}
.category-filter-btn { background-color: #fff; border: 2px solid rgba(0,0,0,0.2); border-radius: 50%; width: 40px; height: 40px; cursor: pointer; box-shadow: 0 1px 5px rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; font-size: 18px; transition: all 0.2s ease; }
.category-filter-btn:hover { background-color: #f4f4f4; }
.category-filter-btn.active { background-color: #00bcd4; color: white; border-color: #00bcd4; }
.category-filter-btn.destaques.active {
    background-color: #DAA520; 
    border-color: #DAA520;
}


/* --- ÍCONE CUSTOMIZADO COM BANNER --- */
.icon-banner-container {
    background: transparent;
    border: none;
}
.icon-banner-container .premium-banner-divicon {
    position: absolute;
    width: auto;
    min-width: 80px;
    max-width: 150px;
    top: -27px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #DAA520;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    pointer-events: none;
}
.icon-banner-container img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 41px;
}

/* --- MODAIS E FORMULÁRIO --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); z-index: 2000; display: none; align-items: center; justify-content: center; }
.modal-content { background: #fff; padding: 25px; border-radius: 8px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 10px; right: 15px; font-size: 24px; font-weight: bold; cursor: pointer; color: #888; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group .input-error { border-color: #d9534f !important; }
.form-submit-btn { width: 100%; padding: 12px; background-color: #28a745; color: white; border: none; font-weight: bold; border-radius: 4px; cursor: pointer; }
#form-status { margin-top: 15px; text-align: center; font-weight: bold; }
.popup-actions { 
    margin-top: 10px; 
    padding-top: 5px; 
    border-top: 1px solid #eee; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.popup-actions a { color: #555; text-decoration: none; font-size: 18px; }
.popup-actions a:hover { color: #000; }
.popup-likes-container, .popup-main-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.popup-actions .likes { cursor: pointer; transition: transform 0.2s; }
.popup-actions .likes:hover { transform: scale(1.1); }
.popup-actions .likes.active span { color: #00bcd4; font-weight: bold; }
.popup-actions .likes span { font-size: 14px; font-weight: normal; margin-left: 4px; vertical-align: middle; }
.popup-details-btn { padding: 4px 8px; background-color: #00bcd4; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
.popup-details-btn:hover { background-color: #0097a7; }

/* --- ESTILOS DO LOGO --- */
#logo-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
}
#logo-img {
    max-height: 240px;
    max-width: 480px;
    width: auto;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}
#logo-img:hover {
    transform: scale(1.05);
}


/* --- ESTILOS PARA OS CLUSTERS PERSONALIZADOS --- */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(178, 235, 242, 0.6);
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: rgba(178, 235, 242, 0.9);
    color: #333;
}

/* --- MODAL DE DETALHES DO RESTAURANTE --- */
.details-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.details-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.details-modal-content {
    background: #fdfdfd;
    width: 80%;
    height: 80%;
    max-width: 1200px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.details-modal-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    z-index: 10;
}
.details-modal-body {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

/* --- CABEÇALHO DO MODAL DE DETALHES --- */
.details-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.details-modal-header h2 {
    margin: 0;
    color: #333;
    border: none;
    padding: 0;
}
.modal-header-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0; 
}
.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
    transition: transform 0.2s;
    border: none;
    cursor: pointer;
}
.header-btn.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    color: white;
}
.header-btn.site {
    background-color: #3498db;
    color: white;
}
.header-btn.edit {
    background-color: #f39c12;
    color: white;
}
.header-btn:hover {
    transform: scale(1.1);
}
.header-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #888;
}
.header-btn.disabled:hover {
    transform: none; 
}


/* --- CARROSSEL DE FOTOS --- */
.carousel-container {
    width: 100%;
    height: 350px;
    position: relative;
    overflow: hidden;
    background: #eee;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex; 
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 18px;
}
.carousel-slide {
    display: none;
    width: 100%; height: 100%;
}
.carousel-slide.active {
    display: block;
}
.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 5;
}
.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* --- DETALHES E RESENHAS --- */
.reviews-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #eee;
    margin-bottom: 15px;
}
.reviews-section-header h3 {
    margin: 0;
    padding-bottom: 10px;
}
.add-review-btn {
    background-color: #00bcd4;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.add-review-btn:hover {
    background-color: #0097a7;
}
.review-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.review-user {
    font-weight: bold;
}
.review-rating {
    color: #ffc107;
    font-size: 22px;
}

/* --- PAGINAÇÃO --- */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0;
    gap: 5px;
}
.page-btn {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.page-btn:hover {
    background-color: #f0f0f0;
}
.page-btn.active {
    background-color: #00bcd4;
    color: white;
    border-color: #00bcd4;
    font-weight: bold;
}

/* --- ESPAÇOS PARA ANÚNCIOS (ADSENSE) --- */
#adsense-header-banner {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 728px; 
    height: 90px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: bold;
    z-index: 1500; 
}
.adsense-modal-placeholder {
    width: 100%;
    min-height: 100px;
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: bold;
    margin-bottom: 25px;
}


/* --- MODAL DE NOVA RESENHA E AVALIAÇÃO POR ESTRELAS --- */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 28px;
}
.star-rating input {
    display: none;
}
.star-rating label {
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffc107;
}
#review-form-status { margin-top: 15px; text-align: center; font-weight: bold; }
#edit-suggestion-status { margin-top: 15px; text-align: center; font-weight: bold; }


/* --- ESTILOS RESPONSIVOS PARA MOBILE --- */
@media (max-width: 768px) {
    /* Reposiciona o menu FAB e o Logo para baixo do banner de anúncio */
    .fab-container {
        top: 110px; /* 90px do banner + 20px de margem */
    }
    #logo-container {
        top: 100px; /* 90px do banner + 10px de margem */
    }

    /* Reduz o tamanho do logo */
    #logo-img {
        max-height: 120px;
    }
}

@media (max-width: 480px) {
    /* Em telas muito pequenas, reduz ainda mais o logo */
    #logo-img {
        max-height: 100px;
    }

    /* Opcional: reduz o tamanho dos botões de filtro de categoria */
    .category-filter-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}
