:root {
  --el-brand-teal: #24a58f;
  --el-brand-teal-dark: #0f7b5c;
}

.el-spot-widget {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  font-family: inherit;
}

.el-spot-header {
  display: flex;
  justify-content: space-between; /* Håller knapparna på varsin sida */
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.el-spot-controls-left {
  display: flex;
  gap: 10px;
}

.el-spot-controls-right {
  display: flex;
  align-items: center;
}

.el-spot-layout-btn {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.el-spot-layout-btn.active {
  background-color: #2c9c8e; /* Elmarknad Green */
  border-color: #2c9c8e;
  color: #ffffff;
}

.el-spot-layout-btn i {
  font-size: 14px;
}

.el-spot-vat-select {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  color: #374151;
  background: #fff;
  cursor: pointer;
}

/* --- GRID --- */
.el-spot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Enskilt kort (centrerat) */
.el-spot-grid-single {
  display: block;
  max-width: 400px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  /* Tvinga 2 kolumner på surfplatta och mobil */
  .el-spot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- CARD --- */
.el-spot-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  border: 1px solid #dde3ee;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.el-spot-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.el-spot-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.el-spot-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.el-spot-area {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

.el-spot-single-badge {
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
}

.el-spot-change {
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.el-spot-change--up { color: var(--el-brand-teal-dark); }
.el-spot-change--down { color: #cc3232; }
.el-spot-change--flat { color: #6b7280; }

.el-spot-body {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Alltid vänsterställt */
  text-align: left;        /* Alltid vänsterställt */
}

.el-spot-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 2px;
  width: 100%;
}

.el-spot-price {
  font-size: 2rem;
  font-weight: 800;
  color: #003c78; /* Mörkblå */
  line-height: 1.1;
  margin-top: 2px;
}

.el-spot-unit {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 2px;
}

/* --- DETAILS (EXPANDER) --- */
.el-spot-detail {
  margin-top: 10px;
  border-top: 1px solid #edf1f7;
  padding-top: 8px;
  width: 100%;
  display: none; /* Döljs som standard (enkel vy) */
}

.el-spot-widget.el-spot--detailed .el-spot-detail {
  display: block; /* Visas i detaljerad vy */
}

.el-spot-detail-group {
  margin-bottom: 8px;
}

.el-spot-detail-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.el-spot-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #4b5563;
  margin-bottom: 4px;
  width: 100%;
}

.el-spot-detail-row span:first-child {
  color: #6b7280; /* Label färg */
}

.el-spot-detail-value {
  font-weight: 600;
  color: #111827;
}

/* --- FOOTER --- */
.el-spot-global-footer {
  margin-top: 15px;
  text-align: center;
}

.el-spot-global-updated {
  font-size: 0.8rem;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- MOBILE TWEAKS --- */
@media (max-width: 768px) {
  .el-spot-grid {
    gap: 12px;
  }
  
  .el-spot-card {
    padding: 12px;
  }

  .el-spot-price {
    font-size: 1.6rem; /* Något mindre på mobil */
  }
  
  /* Säkerställ vänsterställning även här */
  .el-spot-body,
  .el-spot-label,
  .el-spot-price,
  .el-spot-unit {
    text-align: left;
    align-items: flex-start;
  }
}