/* locations.css - Diseño replicando ResidentialTimeSlotControl.tsx (Captura 2) */

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #e0e0e0;
    color: #0f172a;
}

.locations-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.locations-header {
    background-color: #10b981; /* Verde base ONEV */
    color: white;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.locations-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightning-icon {
    font-size: 20px;
    display: inline-block;
}

.locations-subtitle {
    margin: 0;
    font-size: 15px;
    opacity: 0.9;
    font-weight: 400;
}

.chargers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Base de la tarjeta */
.charger-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: #1e293b;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.charger-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

/* Header de la tarjeta */
.charger-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.charger-card-title h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.charger-cp-id {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Badge = "Disponible" / "Cargando" */
.badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

/* Simulación de los colores de la captura 2 */
.badge-green {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.badge-green::before {
    content: '✓';
    margin-right: 4px;
    font-weight: bold;
}

.badge-blue {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.badge-blue::before {
    content: '⚡';
    margin-right: 4px;
}

.badge-gray {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.badge-gray::before {
    content: '🔌';
    margin-right: 4px;
}

.badge-yellow {
    background-color: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
}
.badge-yellow::before {
    content: '🕒';
    margin-right: 4px;
}

.badge-red {
    background-color: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
}
.badge-red::before {
    content: '⚠️';
    margin-right: 4px;
}

/* Body de la tarjeta */
.charger-card-body {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.status-label {
    color: #64748b;
}

.status-value {
    font-weight: 600;
}

.text-green {
    color: #10b981;
}

.text-blue {
    color: #3b82f6;
}

.text-gray {
    color: #64748b;
}

.text-yellow {
    color: #eab308;
}

.text-red {
    color: #ef4444;
}

/* Footer de la tarjeta */
.charger-card-footer {
    background-color: #f1f5f9; /* Color gris azulado muy tenue de fondo de boton */
    color: #3b82f6; /* Texto azul para 'Sin reservas pendientes' */
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
}

#loader, .error-msg, .no-chargers {
    text-align: center;
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 16px;
    padding: 40px;
}

@media (max-width: 640px) {
    .chargers-grid {
        grid-template-columns: 1fr;
    }
}
