.info-panel {
  --info-panel-width: 250px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  width: min(var(--info-panel-width), 100%);
  min-height: 46px;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: background 0.3s ease;
}

[data-theme="dark"] .info-panel,
.dark .info-panel {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.75);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.info-panel__viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.info-panel__card {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
}

.info-panel__label {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4b5563;
  flex: 0 0 auto;
}

.info-panel__value {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  flex: 0 0 auto;
}

.info-panel__description {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.05;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-panel__meta {
  font-size: 0.74rem;
  color: #6b7280;
}

.info-panel__card--weather .info-panel__value {
  color: #2563eb;
}

.info-panel__card--stocks .info-panel__value {
  color: #047857;
}

.info-panel__card--news .info-panel__value {
  color: #7c3aed;
}

.info-panel__card--reminders .info-panel__value {
  color: #b45309;
}

.info-panel__card--placeholder .info-panel__value {
  color: #6b7280;
}

.info-panel__actions {
  display: flex;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.info-panel__action {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: transparent;
  color: #111827;
  font-size: 0.95rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.info-panel__action svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
}

.info-panel__action:hover {
  background: rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .info-panel__action,
.dark .info-panel__action {
  border-color: rgba(255, 255, 255, 0.2);
  color: #f3f4f6;
}

[data-theme="dark"] .info-panel__action:hover,
.dark .info-panel__action:hover {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .info-panel__label,
.dark .info-panel__label {
  color: rgba(229, 231, 235, 0.8);
}

[data-theme="dark"] .info-panel__value,
.dark .info-panel__value {
  color: #f9fafb;
}

[data-theme="dark"] .info-panel__description,
.dark .info-panel__description,
[data-theme="dark"] .info-panel__meta,
.dark .info-panel__meta {
  color: rgba(229, 231, 235, 0.7);
}

.info-panel__card--warning .info-panel__value {
  color: #b45309;
}

.info-panel-modal {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.info-panel-modal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.info-panel-modal__row span:last-child {
  font-weight: 600;
}

.info-panel-modal__list {
  list-style: decimal inside;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.9rem;
}

.info-panel-modal__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.info-panel-modal__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.info-panel-modal__table th,
.info-panel-modal__table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.info-panel-modal__table th {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg-pane) 80%, var(--bg-card) 20%);
}

.info-panel-modal__table tbody tr:last-child td {
  border-bottom: none;
}

.info-panel-modal__empty {
  font-size: 0.88rem;
  color: var(--muted);
}

.info-panel-modal__links {
  font-size: 0.84rem;
  color: var(--muted);
}

.info-panel-modal__links a {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .info-panel {
    transition: none;
  }
}

@media (max-width: 640px) {
  .info-panel {
    width: 100%;
    border-radius: 16px;
  }
  .info-panel__action {
    width: 32px;
    height: 32px;
  }
}
