/* Lånsammenligning Widget – widget.css */

.laan-widget-root {
  font-family: 'Karla', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1f2e;
  font-size: 15px;
  line-height: 1.6;
  max-width: 100%;
  margin: 0 auto;
}

/* ── Loading ── */
.laan-loading {
  text-align: center;
  padding: 40px;
  color: #64748b;
  font-size: 14px;
}

.laan-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(0,0,0,0.10);
  border-top-color: #2563b0;
  border-radius: 50%;
  animation: laan-spin 0.7s linear infinite;
  margin: 0 auto 12px;
}

@keyframes laan-spin { to { transform: rotate(360deg); } }

/* ── Header ── */
.laan-header {
  text-align: center;
  margin-bottom: 24px;
}

.laan-header h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  color: #1a3a5c;
  margin: 0 0 4px;
}

.laan-header p {
  color: #64748b;
  font-size: 13px;
  margin: 0;
}

/* ── Filter bar ── */
.laan-filter-bar {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.05);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 20px;
  align-items: end;
}

.laan-fg label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.laan-fg input[type=range] {
  width: 100%;
  accent-color: #2563b0;
  height: 4px;
  cursor: pointer;
}

.laan-range-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.laan-range-val {
  font-size: 14px;
  font-weight: 600;
  color: #1a3a5c;
}

.laan-range-hint {
  font-size: 11px;
  color: #94a3b8;
}

.laan-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  color: #1a1f2e;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.laan-select:focus {
  border-color: #2563b0;
  box-shadow: 0 0 0 3px rgba(37,99,176,0.12);
}

.laan-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.laan-checkboxes label {
  display: flex !important;
  align-items: center;
  gap: 7px;
  font-size: 13px !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #1a1f2e !important;
  cursor: pointer;
  margin-bottom: 0 !important;
}

.laan-checkboxes input[type=checkbox] {
  accent-color: #2563b0;
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* ── Results meta ── */
.laan-meta {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
  padding-left: 2px;
}

.laan-meta strong { color: #1a1f2e; }

/* ── Loan card ── */
.laan-card {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 14px rgba(0,0,0,0.05);
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.14s;
}

.laan-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.18);
  transform: translateY(-1px);
}

.laan-card-top {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: center;
}

/* Logo */
.laan-logo {
  width: 80px;
  height: 44px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.laan-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.laan-logo-text {
  font-size: 10px;
  font-weight: 700;
  color: #1a3a5c;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

/* Name + badges */
.laan-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a3a5c;
  margin-bottom: 5px;
}

.laan-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.laan-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.laan-badge-laan    { background: #e8f0f9; color: #2563b0; }
.laan-badge-mini    { background: #faeeda; color: #ba7517; }
.laan-badge-free    { background: #e1f5ee; color: #0f6e56; }
.laan-badge-remarks { background: #fce8e8; color: #a32d2d; }

/* Stats row */
.laan-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.laan-stat {
  text-align: center;
}

.laan-stat-label {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.laan-stat-value {
  font-size: 16px;
  font-weight: 600;
  color: #1a1f2e;
}

.laan-stat-value.good { color: #0f6e56; }

.laan-stat-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}

/* Bottom row */
.laan-card-bottom {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.laan-details {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: #64748b;
  flex-wrap: wrap;
}

.laan-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  margin-right: 4px;
  vertical-align: middle;
}

.laan-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* CTA button */
.laan-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #43a047;
  color: #fff !important;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.14s, transform 0.10s;
  white-space: nowrap;
}

.laan-cta:hover { background: #1b5e20; }
.laan-cta:active { transform: scale(0.97); }
.laan-cta svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Expand toggle */
.laan-toggle {
  background: none;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 8px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.14s;
}

.laan-toggle:hover {
  background: #e8f0f9;
  color: #2563b0;
  border-color: #2563b0;
}

/* Expanded section */
.laan-expanded {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.laan-expanded.open { display: block; }

.laan-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.laan-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-size: 13px;
}

.laan-detail-row:last-child { border-bottom: none; }
.laan-dkey { color: #64748b; }
.laan-dval { font-weight: 600; color: #1a1f2e; }
.laan-dval.good { color: #0f6e56; }

.laan-example {
  background: #f7f8fa;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
  margin-top: 12px;
  border-left: 3px solid #2563b0;
}

/* Empty state */
.laan-empty {
  text-align: center;
  padding: 48px 24px;
  color: #64748b;
}

.laan-empty p { margin-top: 8px; font-size: 14px; }

/* Footer note */
.laan-footer {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 20px;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .laan-filter-bar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .laan-card-top {
    grid-template-columns: 60px 1fr;
  }

  .laan-card-top .laan-cta {
    display: none;
  }

  .laan-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .laan-card-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .laan-actions {
    flex-direction: column;
  }

  .laan-cta.mobile-cta {
    display: flex !important;
    justify-content: center;
  }

  .laan-detail-grid {
    grid-template-columns: 1fr;
  }
}
