/**
 * Google Places - Estilos específicos
 */

/* Google Places - Tabela compacta sem quebra de linha */
#google-placesTab .data-table {
    font-size: 11px;
}

#google-placesTab .data-table td,
#google-placesTab .data-table th {
    padding: 6px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


#google-placesTab .data-table th:nth-child(1) {
    width: 30%;
    max-width: 500px;
}

/* Nome */
#google-placesTab .data-table th:nth-child(2) {
    width: 10%;
}

/* Categoria */
#google-placesTab .data-table th:nth-child(3) {
    width: 10%;
}

/* Cidade */
#google-placesTab .data-table th:nth-child(4) {
    width: 25%;
    max-width: 220px;
}

/* Endereço */
#google-placesTab .data-table th:nth-child(5) {
    width: 12%;
}

/* Telefone */
#google-placesTab .data-table th:nth-child(6) {
    width: 8%;
}

/* Avaliação */
#google-placesTab .data-table th:nth-child(7) {
    width: 5%;
    text-align: center;
}

/* Links */

/* Forçar max-width também nos TDs para truncamento */
#google-placesTab .data-table td:nth-child(1) {
    max-width: 500px;
}

/* Nome */
#google-placesTab .data-table td:nth-child(4) {
    max-width: 220px;
}

/* Endereço */
#google-placesTab .data-table td:nth-child(5) {
    max-width: 150px;
}

/* Telefone */

#google-placesTab .data-table small {
    font-size: 10px;
}

/* IBGE City Selector */
.city-selector-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ibge-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 200px;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
}

.cities-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 60px;
    align-items: center;
}

.city-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--marsala);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    height: fit-content;
}

.city-chip .city-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

.city-chip .uf-badge {
    background-color: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
}

.city-chip .remove-city-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0 4px;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.city-chip .remove-city-btn:hover {
    opacity: 1;
}

/* Category Selector */
.category-selector-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.categories-available-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 60px;
}

.category-chip-available {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: white;
    color: var(--marsala);
    border: 2px dashed var(--marsala);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-chip-available:hover {
    background-color: var(--marsala);
    color: white;
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(114, 47, 55, 0.2);
}

.categories-selected-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-height: 60px;
    align-items: center;
}

.category-chip-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--gold);
    color: var(--marsala);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    height: fit-content;
}

.category-chip-selected .remove-category-btn {
    background: none;
    border: none;
    color: var(--marsala);
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.category-chip-selected .remove-category-btn:hover {
    opacity: 1;
}

/* Filter Group */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    margin: 0;
    color: var(--marsala);
    font-size: 14px;
}

.filter-group select,
.filter-group .form-control {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-group select:focus,
.filter-group .form-control:focus {
    outline: none;
    border-color: var(--marsala);
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.1);
}

.filter-group select[multiple] {
    padding: 5px;
    cursor: default;
}

.filter-group small {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* Filters Actions */
.filters-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

/* Table Body */
.table-body {
    padding: 20px;
}

/* Results Section - com espaçamento do container principal */
#resultsSection {
    margin-top: 30px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-header h3 {
    margin: 0;
}

.results-actions {
    display: flex;
    gap: 10px;
}

.results-info {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--marsala);
}

/* Table - com cabeçalho branco */
.table-responsive {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Table styles inherited from admin.css */

.data-table tbody tr.cached-row {
    background-color: #e8f5e9;
}

.data-table tbody tr.cached-row:hover {
    background-color: #c8e6c9;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: #4caf50;
    color: white;
}

.badge-secondary {
    background-color: #6c757d;
    color: white;
}

/* Checkbox */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--marsala);
}

input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Buttons - styles inherited from admin.css */

/* Loading Overlay - não usado mais mas mantido por compatibilidade */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--gold);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    font-size: 16px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .ibge-selector-grid {
        grid-template-columns: 1fr;
    }

    .filters-actions {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .results-actions {
        width: 100%;
        flex-direction: column;
    }

    .results-actions button {
        width: 100%;
    }

    .data-table {
        font-size: 13px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

/* Links */
a {
    color: var(--marsala);
    text-decoration: none;
    font-size: 18px;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--gold);
}

/* Scroll suave */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--marsala) #f1f1f1;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: var(--marsala);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #8b3d47;
}