/* Shared extension install kit — see public/frontend/js/cs-ext-install-kit.js */

/* Installed users never see pure install promos. */
.cs-ext-installed .cs-nav-ext,
.cs-ext-installed #cs-ext-promo-card,
.cs-ext-installed #cs-ext-intent,
.cs-ext-installed #cs-extension-promo,
.cs-ext-installed .cs-ext-dl,
.cs-ext-installed #csExtStickyBar,
.cs-ext-installed [data-cs-hide-if-ext] {
  display: none !important;
}

/* ---------- Post-activation nudge ---------- */
.cs-ext-nudge {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147482000;
  box-sizing: border-box;
  width: 360px;
  max-width: calc(100vw - 32px);
  padding: 18px 18px 16px;
  color: #d7e2e8;
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1219;
  border: 1px solid rgba(70, 196, 224, .28);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .45);
  animation: csExtNudgeIn .28s ease-out;
}
.cs-ext-nudge *,
.cs-ext-nudge *::before,
.cs-ext-nudge *::after {
  box-sizing: border-box;
}
@keyframes csExtNudgeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-ext-nudge { animation: none; }
}
.cs-ext-nudge__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, .06);
  border: 0;
  border-radius: 50%;
}
.cs-ext-nudge__close:hover,
.cs-ext-nudge__close:focus-visible {
  background: rgba(255, 255, 255, .14);
  outline: 2px solid #46c4e0;
  outline-offset: 1px;
}
.cs-ext-nudge__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 30px;
}
.cs-ext-nudge__fox {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.cs-ext-nudge__title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}
.cs-ext-nudge__title::before {
  content: "\2713";
  display: inline-block;
  margin-right: 6px;
  color: #3ddc97;
}
.cs-ext-nudge__copy {
  margin: 10px 0 14px;
  color: #b9c7cf;
  font-size: 14px;
  line-height: 1.45;
}
.cs-ext-nudge__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
a.cs-ext-nudge__cta {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  text-decoration: none !important;
  background: linear-gradient(180deg, #2f8cff 0%, #1468e0 100%);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(20, 104, 224, .35);
}
a.cs-ext-nudge__cta:hover,
a.cs-ext-nudge__cta:focus-visible {
  background: linear-gradient(180deg, #4a9bff 0%, #1d74ec 100%);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.cs-ext-nudge__later {
  min-height: 44px;
  padding: 0 10px;
  color: #9fb0b9;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: 0;
}
.cs-ext-nudge__later:hover,
.cs-ext-nudge__later:focus-visible {
  color: #fff;
  text-decoration: underline;
}

/* ---------- Sticky install bar (pages that render #csExtStickyBar) ---------- */
#csExtStickyBar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 2147481000;
  display: flex;
  align-items: center;
  gap: 14px;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 10px 10px 16px;
  color: #fff;
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: rgba(11, 18, 25, .96);
  border: 1px solid rgba(70, 196, 224, .3);
  border-radius: 999px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
}
#csExtStickyBar[hidden] {
  display: none;
}
.cs-ext-sticky__fox {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
.cs-ext-sticky__text {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
a.cs-ext-sticky__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 18px;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
  background: linear-gradient(180deg, #2f8cff 0%, #1468e0 100%);
  border-radius: 999px;
}
a.cs-ext-sticky__cta:hover,
a.cs-ext-sticky__cta:focus-visible {
  background: linear-gradient(180deg, #4a9bff 0%, #1d74ec 100%);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.cs-ext-sticky__cta img {
  width: 18px;
  height: 18px;
}
.cs-ext-sticky__close {
  width: 34px;
  height: 34px;
  padding: 0;
  color: #9fb0b9;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 50%;
}
.cs-ext-sticky__close:hover,
.cs-ext-sticky__close:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

/* Desktop-only: extensions cannot be installed from phones. */
@media (max-width: 767px) {
  .cs-ext-nudge,
  #csExtStickyBar {
    display: none !important;
  }
}
@media (max-width: 900px) {
  .cs-ext-sticky__text { display: none; }
}

/* Homepage hero: Add to Chrome promoted to the primary action. */
.cs-hero__actions .cs-hero__btn--ext.cs-hero__btn--ext-primary,
body.cs-hp-redesign .cs-hero__actions .cs-hero__btn--secondary.cs-hero__btn--ext.cs-hero__btn--ext-primary {
  background: #1677ff !important;
  border-color: #1677ff !important;
  box-shadow: 0 10px 28px rgba(22, 119, 255, .35) !important;
}
.cs-hero__actions .cs-hero__btn--ext.cs-hero__btn--ext-primary:hover,
.cs-hero__actions .cs-hero__btn--ext.cs-hero__btn--ext-primary:focus-visible {
  background: #0f63db !important;
  border-color: #0f63db !important;
}

/* ---------- "Email me the install link" card ---------- */
.cs-ext-email {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-sizing: border-box;
  width: 100%;
  max-width: 560px;
  margin: 16px auto;
  padding: 16px;
  color: #d7e2e8;
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  background: #0b1219;
  border: 1px solid rgba(70, 196, 224, .28);
  border-radius: 16px;
}
.cs-ext-email[hidden] {
  display: none !important;
}
.cs-ext-email *,
.cs-ext-email *::before,
.cs-ext-email *::after {
  box-sizing: border-box;
}
.cs-ext-email__fox {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.cs-ext-email__main {
  flex: 1;
  min-width: 0;
}
.cs-ext-email__title {
  margin: 0 0 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}
.cs-ext-email__copy {
  margin: 0 0 12px;
  color: #b9c7cf;
  font-size: 14px;
  line-height: 1.45;
}
.cs-ext-email__form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.cs-ext-email__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.cs-ext-email__input {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  color: #fff;
  font-size: 16px; /* no iOS zoom on focus */
  background: #101923;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
}
.cs-ext-email__input:focus {
  border-color: #46c4e0;
  outline: 2px solid rgba(70, 196, 224, .35);
  outline-offset: 1px;
}
.cs-ext-email__btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(180deg, #2f8cff 0%, #1468e0 100%);
  border: 0;
  border-radius: 10px;
}
.cs-ext-email__btn:hover,
.cs-ext-email__btn:focus-visible {
  background: linear-gradient(180deg, #4a9bff 0%, #1d74ec 100%);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.cs-ext-email__btn[disabled] {
  cursor: default;
  opacity: .6;
}
.cs-ext-email__note {
  margin: 8px 0 0;
  color: #8ea0aa;
  font-size: 12px;
}
.cs-ext-email__status {
  margin: 6px 0 0;
  color: #3ddc97;
  font-size: 14px;
  font-weight: 700;
}
.cs-ext-email__status:empty {
  display: none;
}
.cs-ext-email.is-sent .cs-ext-email__form,
.cs-ext-email.is-sent .cs-ext-email__note {
  display: none;
}
@media (max-width: 420px) {
  .cs-ext-email__btn { flex: 1 1 100%; }
}

/* ---------- Safari "coming soon" (inline notice + modal) ---------- */
.cs-ext-installed [data-cs-safari-soon] { display: none !important; }
.cs-ext-safari-soon {
  display: block;
  box-sizing: border-box;
  max-width: 640px;
  margin: 12px 0;
  padding: 12px 16px;
  color: #d7e2e8;
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background: #0b1219;
  border: 1px solid rgba(70, 196, 224, .35);
  border-radius: 12px;
}
.cs-ext-safari-soon[hidden] { display: none; }
.cs-ext-safari-soon__title { display: block; margin-bottom: 2px; color: #fff; font-weight: 700; }
.cs-ext-safari-modal {
  position: fixed;
  inset: 0;
  z-index: 2147482500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 8, 12, .62);
}
.cs-ext-safari-modal__card {
  position: relative;
  box-sizing: border-box;
  width: 420px;
  max-width: 100%;
  padding: 24px 22px 20px;
  color: #d7e2e8;
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1219;
  border: 1px solid rgba(70, 196, 224, .28);
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .45);
}
.cs-ext-safari-modal__title { margin: 0 28px 10px 0; color: #fff; font-size: 18px; font-weight: 700; line-height: 1.3; }
.cs-ext-safari-modal__copy { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.cs-ext-safari-modal__ok {
  min-height: 44px;
  padding: 10px 22px;
  color: #062029;
  font-weight: 700;
  cursor: pointer;
  background: #00c2e2;
  border: 0;
  border-radius: 10px;
}
