/* ==================== */
/* ESTILOS BASE Y RESET */
/* ==================== */
.wll-title {
  margin: 8px 0 10px;
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
}

.wll-no-data {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  color: #6c757d;
  font-style: italic;
  margin: 10px 0;
}

/* ==================== */
/* TARJETAS DE CONDICIONES ACTUALES */
/* ==================== */
.wll-current {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 8px 0 16px;
}

.wll-current > div {
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-size: 14px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.wll-current > div:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: #d0d7e0;
}

.wll-current > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wll-current > div:hover::before {
  opacity: 1;
}

.wll-current strong {
  display: block;
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==================== */
/* GRÁFICOS */
/* ==================== */
.wll-chart {
  position: relative;
  width: 100%;
  height: 220px;
  background: #fff;
  border: 1px solid #e6e9ef;
  border-radius: 8px;
  padding: 8px 10px;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.wll-chart:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ==================== */
/* VALORES INDIVIDUALES - MEJORADO */
/* ==================== */
.wll-value {
  display: inline-flex;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e9ecef;
  color: #2c3e50;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.2;
  position: relative;
  overflow: hidden;
}

.wll-value::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s ease;
}

.wll-value:hover::before {
  left: 100%;
}

.wll-value:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: #d0d7e0;
}

/* Estilos específicos para cada tipo de valor - MEJORADO */
.wll-temp {
  color: #e74c3c;
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  border-color: #ef9a9a;
  border-left: 4px solid #e74c3c;
  font-size: 1.2em;
}

.wll-pressure {
  color: #3498db;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-color: #90caf9;
  border-left: 4px solid #3498db;
  font-size: 1.2em;
}

.wll-wind {
  color: #27ae60;
  background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
  border-color: #a5d6a7;
  border-left: 4px solid #27ae60;
  font-size: 1.2em;
}

.wll-humidity {
  color: #9b59b6;
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  border-color: #ce93d8;
  border-left: 4px solid #9b59b6;
  font-size: 1.2em;
}

.wll-rain {
  color: #2980b9;
  background: linear-gradient(135deg, #e1f5fe, #b3e5fc);
  border-color: #81d4fa;
  border-left: 4px solid #2980b9;
  font-size: 1.2em;
}

.wll-wind-direction {
  font-size: 0.75em;
  opacity: 0.8;
  margin-left: 6px;
  font-style: italic;
  background: rgba(0,0,0,0.1);
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 500;
}

/* Estados especiales */
.wll-value-updating {
  animation: pulse 1.5s ease-in-out infinite;
}

.wll-value-high {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  border-color: #ef5350;
}

.wll-value-low {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-color: #42a5f5;
}

/* ==================== */
/* VARIANTES DE TAMAÑO - MEJORADO */
/* ==================== */
.wll-value-small {
  font-size: 0.8em;
  padding: 4px 8px;
  border-radius: 6px;
  border-left-width: 3px;
}

.wll-value-large {
  font-size: 1.3em;
  padding: 10px 18px;
  border-radius: 10px;
  border-left-width: 5px;
}

.wll-value-xlarge {
  font-size: 1.8em;
  padding: 14px 24px;
  border-radius: 12px;
  border-left-width: 6px;
  font-weight: 700;
}

/* ==================== */
/* VARIANTES DE ESTILO - MEJORADO */
/* ==================== */
.wll-value-minimal {
  background: transparent;
  border: 2px solid currentColor;
  border-left: 4px solid currentColor;
  font-weight: 700;
}

.wll-value-flat {
  background: #34495e;
  color: white;
  border: none;
  border-left: 4px solid #2c3e50;
}

.wll-value-outline {
  background: transparent;
  border: 2px solid;
  border-left: 4px solid currentColor;
  font-weight: 700;
}

.wll-value-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-left: 4px solid rgba(255, 255, 255, 0.5);
}

/* ==================== */
/* GRUPOS DE VALORES - MEJORADO */
/* ==================== */
.wll-values-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.wll-values-group .wll-value {
  min-width: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  height: 100%;
}

.wll-values-group .wll-value::before {
  font-size: 0.75em;
  opacity: 0.9;
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wll-values-group .wll-temp::before { content: "🌡️ Temperatura"; }
.wll-values-group .wll-pressure::before { content: "📊 Presión"; }
.wll-values-group .wll-wind::before { content: "💨 Viento"; }
.wll-values-group .wll-humidity::before { content: "💧 Humedad"; }
.wll-values-group .wll-rain::before { content: "🌧️ Lluvia"; }

/* ==================== */
/* ANIMACIONES */
/* ==================== */
@keyframes pulse {
  0% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4);
  }
  50% { 
    transform: scale(1.02);
    box-shadow: 0 0 0 6px rgba(52, 152, 219, 0);
  }
  100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wll-value-animate {
  animation: slideIn 0.5s ease-out;
}

/* ==================== */
/* RESPONSIVIDAD */
/* ==================== */
@media (max-width: 768px) {
  .wll-current {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
  }
  
  .wll-values-group {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
  }
  
  .wll-value-large {
    font-size: 1.1em;
    padding: 8px 14px;
  }
  
  .wll-value-xlarge {
    font-size: 1.5em;
    padding: 12px 18px;
  }
  
  .wll-chart {
    height: 200px;
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .wll-current {
    grid-template-columns: 1fr 1fr;
  }
  
  .wll-values-group {
    grid-template-columns: 1fr;
  }
  
  .wll-current > div {
    padding: 10px;
    font-size: 13px;
  }
  
  .wll-title {
    font-size: 16px;
  }
}

/* ==================== */
/* ESTADOS DE CARGA Y ERROR */
/* ==================== */
.wll-loading {
  opacity: 0.6;
  pointer-events: none;
}

.wll-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.wll-error {
  background: #ffebee !important;
  border-color: #ef9a9a !important;
  color: #c62828 !important;
}