/* Shared pieces for the Settings, Files and Google Drive pages: page header,
   cards, status badges and list rows. Feature styles live in settings.css,
   files.css and drive.css. */

/* ------------------------------------------------------------- page header */

.page-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0 4px;
}

.page-head__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.page-head__back:hover {
  color: var(--ink);
}

.page-head__back svg {
  width: 16px;
  height: 16px;
}

.page-head__title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
}

.page-head__lede {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
}

/* ------------------------------------------------------------------- cards */

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg);
  scroll-margin-top: 96px;
}

.card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
}

.card__heading {
  display: flex;
  flex: 1 1 280px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.card__title svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--muted);
}

.card__lede {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card__note {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.45;
}

/* ------------------------------------------------------------------ badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--soft-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 450;
  line-height: 1;
  white-space: nowrap;
}

.badge svg {
  width: 13px;
  height: 13px;
}

.badge--ok {
  background: color-mix(in srgb, #1f9d55 14%, transparent);
  color: color-mix(in srgb, #1f9d55 80%, var(--ink));
}

.badge--warn {
  background: color-mix(in srgb, #d98a00 16%, transparent);
  color: color-mix(in srgb, #b26b00 85%, var(--ink));
}

.badge--error {
  background: color-mix(in srgb, var(--danger) 14%, transparent);
  color: var(--danger);
}

.badge--blue {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  color: color-mix(in srgb, var(--blue) 85%, var(--ink));
}

.badge--muted {
  background: var(--soft-1);
  color: var(--faint);
}

/* ------------------------------------------------------------ list rows */

/* Scoped to .rows: the search palette has its own .row pills. */

.rows {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rows > .row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.rows > .row:first-child {
  border-top: 0;
}

.row__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--soft-2);
  color: var(--muted);
}

.row__icon svg {
  width: 20px;
  height: 20px;
}

.row__main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.row__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.row__meta {
  color: var(--faint);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.row__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

/* A compact round "⋯" trigger for row menus (used with dropdown()). */
.row__more {
  width: 40px;
  height: 40px;
  padding: 0;
}

.row__more .dropdown__caret {
  display: none;
}

@media (max-width: 560px) {
  .card {
    gap: 16px;
    padding: 20px 18px;
    border-radius: 20px;
  }

  .rows > .row {
    align-items: flex-start;
  }

  .row__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
}
