/**
 * NSN Google Preferred Sources
 *
 * Front-end callout styles. Reuses the coupons plugin CSS variables
 * (--accentuation, --textcolor-secondary) defined at the theme/site level
 * so each site automatically inherits its own CTA palette.
 */

.nsn-gps-callout {
  --nsn-gps-accent: var(--accentuation, #d93025);
  --nsn-gps-text-on-accent: var(--textcolor-secondary, #ffffff);
  --nsn-gps-text: #1f2328;
  --nsn-gps-text-muted: #5f6368;
  --nsn-gps-bg: #f6f7f9;
  --nsn-gps-border: #e3e5e8;

  align-items: center;
  background: var(--nsn-gps-bg);
  border: 1px solid var(--nsn-gps-border);
  border-radius: 12px;
  color: var(--nsn-gps-text);
  column-gap: 1.25rem;
  display: flex;
  flex-wrap: nowrap;
  margin-block: 1.5rem;
  margin-inline: 0;
  padding: 1rem 1.25rem;
  position: relative;
  row-gap: 0.75rem;
}

.nsn-gps-callout[hidden] {
  display: none;
}

.nsn-gps-callout__logo {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  line-height: 0;
}

.nsn-gps-callout__logo svg {
  display: block;
  height: 40px;
  width: 40px;
}

.nsn-gps-callout__text {
  flex: 1 1 auto;
  min-width: 0;
}

.nsn-gps-callout__title {
  color: var(--nsn-gps-text);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.25rem;
}

.nsn-gps-callout__body {
  color: var(--nsn-gps-text-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
  margin: 0;
}

.nsn-gps-callout__cta {
  align-items: center;
  background-color: var(--nsn-gps-accent);
  border-radius: 8px;
  color: var(--nsn-gps-text-on-accent);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.9375rem;
  font-weight: 600;
  justify-content: center;
  line-height: 1.2;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  transition: filter 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.nsn-gps-callout__cta:hover,
.nsn-gps-callout__cta:focus {
  background-color: var(--nsn-gps-accent);
  color: var(--nsn-gps-text-on-accent);
  filter: brightness(0.94);
}

.nsn-gps-callout__cta:focus-visible {
  outline: 2px solid var(--nsn-gps-accent);
  outline-offset: 2px;
}

.nsn-gps-callout__dismiss {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #9aa0a6;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 32px;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
  width: 32px;
}

.nsn-gps-callout__dismiss:hover,
.nsn-gps-callout__dismiss:focus {
  background-color: rgba(0, 0, 0, 0.06);
  color: #1f2328;
}

.nsn-gps-callout__dismiss:focus-visible {
  outline: 2px solid var(--nsn-gps-accent);
  outline-offset: 2px;
}

.nsn-gps-callout__dismiss svg {
  display: block;
  height: 16px;
  width: 16px;
}

/* Tablet & below: keep horizontal but tighten spacing. */
@media (max-width: 768px) {
  .nsn-gps-callout {
    column-gap: 0.875rem;
    padding: 0.875rem 1rem;
  }

  .nsn-gps-callout__logo svg {
    height: 32px;
    width: 32px;
  }

  .nsn-gps-callout__title {
    font-size: 1rem;
  }

  .nsn-gps-callout__body {
    font-size: 0.875rem;
  }
}

/* Phone: stack so the CTA gets its own full-width row. */
@media (max-width: 560px) {
  .nsn-gps-callout {
    column-gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem 1rem 1rem 0.875rem;
  }

  .nsn-gps-callout__logo {
    align-self: flex-start;
  }

  .nsn-gps-callout__text {
    flex-basis: calc(100% - 40px - 0.75rem - 32px - 0.75rem);
  }

  .nsn-gps-callout__cta {
    flex: 1 1 100%;
    order: 4;
    padding: 0.75rem 1rem;
  }

  .nsn-gps-callout__dismiss {
    align-self: flex-start;
    height: 28px;
    width: 28px;
  }
}
