/* ==========================================
   Location-page
========================================== */

/* ------------------------------------------
   Página
------------------------------------------ */

.location-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px 56px;
    box-sizing: border-box;
}

.location-page h1 {
    margin: 0 0 24px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15;
    font-weight: 700;
}

/* ------------------------------------------
   Filtros
------------------------------------------ */

.location-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 24px;
    padding: 16px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    box-sizing: border-box;
}

.location-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    margin: 0;
}

.location-filters label span {
    font-size: 0.82rem;
    line-height: 1.2;
    font-weight: 600;
}

.location-filters select {
    width: 100%;
    min-height: 40px;
    padding: 8px 34px 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    font: inherit;
    line-height: 1.3;
    cursor: pointer;
    box-sizing: border-box;
}

.location-filters select:focus {
    outline: none;
    border-color: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.14);
}

/* ------------------------------------------
   Tabla
------------------------------------------ */

.location-encounters {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
}

.location-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.location-table {
    width: 100%;
    min-width: 1080px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}

.location-table th,
.location-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #eef0f2;
    vertical-align: middle;
    text-align: left;
}

.location-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    font-size: 0.78rem;
    line-height: 1.25;
    font-weight: 700;
    white-space: nowrap;
}

.location-table tbody tr:last-child td {
    border-bottom: 0;
}

.location-table tbody tr {
    transition: background-color 0.15s ease;
}

.location-table tbody tr:hover {
    background: #f8fafc;
}

/* ------------------------------------------
   Alineación de datos
------------------------------------------ */

.location-table th:nth-child(6),
.location-table td:nth-child(6),
.location-table th:nth-child(7),
.location-table td:nth-child(7),
.location-table th:nth-child(8),
.location-table td:nth-child(8),
.location-table th:nth-child(9),
.location-table td:nth-child(9) {
    text-align: center;
    white-space: nowrap;
}

.location-table th:nth-child(10),
.location-table td:nth-child(10) {
    white-space: nowrap;
}

/* ------------------------------------------
   Enlaces
------------------------------------------ */

.location-table a {
    text-decoration: none;
}

.location-table a:hover {
    text-decoration: underline;
}

/* ------------------------------------------
   Valores vacíos
------------------------------------------ */

.location-table td:empty::after {
    content: "—";
    opacity: 0.35;
}

/* ------------------------------------------
   Mensaje sin resultados
------------------------------------------ */

.location-page > p {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

/* ------------------------------------------
   Responsive
------------------------------------------ */

@media (max-width: 800px) {

    .location-page {
        padding: 24px 16px 44px;
    }

    .location-page h1 {
        margin-bottom: 20px;
    }

    .location-filters {
        gap: 12px;
        padding: 14px;
    }

    .location-filters label {
        flex: 1 1 180px;
        min-width: 0;
    }

    .location-encounters {
        border-radius: 10px;
    }

    .location-table {
        min-width: 1080px;
        font-size: 0.88rem;
    }

    .location-table th,
    .location-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {

    .location-page {
        padding: 20px 10px 36px;
    }

    .location-page h1 {
        font-size: 1.7rem;
        margin-bottom: 16px;
    }

    .location-filters {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 18px;
        padding: 14px;
    }

    .location-filters label {
        width: 100%;
    }

    .location-filters select {
        min-height: 42px;
    }

    .location-table {
        min-width: 1080px;
    }
}
