/* "Doctor's Note" sign-up prompt (site-overlay/assets/note.js). Desktop: a card
   bottom-right. Mobile (767px and down, the theme's breakpoint): a slim bar
   that expands when Join is tapped. Type and colour follow the site: Didot for
   the line from the doctors, the body font for everything else, black button,
   underlined field. */
.idriss-note {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9000;
  box-sizing: border-box;
  width: 360px;
  max-width: calc(100vw - 48px);
  padding: 22px 24px 18px;
  background: #fff;
  color: #111;
  border: 1px solid #e4e4e4;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.12);
  font-size: 15px;
  line-height: 1.5;
  /* 1.4.10: at high zoom or with a phone keyboard up the box may not fit;
     it scrolls inside rather than running off the screen. */
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.idriss-note.is-open { opacity: 1; transform: none; }
.idriss-note * { box-sizing: border-box; }

/* 2.4.11: never sit over the footer sign-up form (a11y.js sets the class), and
   stay out of the way while the site menu's panel is open (nav.js). */
.idriss-footer-form-visible .idriss-note,
.idn-locked .idriss-note {
  visibility: hidden;
  pointer-events: none;
}

/* Two classes: the theme's `button:active, button:focus { position: relative }`
   (0,1,1) would otherwise drop the button out of the corner mid-click, so the
   press and release land on different elements and no click fires. */
.idriss-note .idriss-note__close {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111;
  cursor: pointer;
}
.idriss-note__eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #555;
}
.idriss-note__title {
  margin: 0 32px 10px 0;
  font-family: DidotDisplay, Verdana, Arial, sans-serif;
  font-size: 24px;
  line-height: 1.2;
  color: #111;
  /* two even lines ("What our dermatologists / tell patients"), never one
     word alone on the second */
  text-wrap: balance;
}
.idriss-note__desc { margin: 0 0 14px; color: #222; }
.idriss-note__form { display: flex; align-items: flex-end; gap: 12px; margin: 0; }
.idriss-note__form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #111;
  border-radius: 0;
  background: transparent;
  color: #111;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming into the field */
}
.idriss-note__form input::placeholder { color: #555; opacity: 1; }
.idriss-note__join,
.idriss-note__expand {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: #000;
  color: #fff;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.idriss-note__join:disabled { opacity: 0.7; cursor: default; }
.idriss-note__fine { margin: 10px 0 0; font-size: 12px; color: #555; }
.idriss-note__fine a { color: inherit; text-decoration: underline; }
/* Kept rendered while empty: screen readers can miss a live region that goes
   from display:none to text in one change. */
.idriss-note__msg { margin: 10px 0 0; font-size: 14px; color: #1f4d2a; }
.idriss-note__msg:empty { margin: 0; }
.idriss-note__msg:focus { outline: none; }
.idriss-note.has-error .idriss-note__msg { color: #a1251b; }
.idriss-note.is-done .idriss-note__panel { display: none; }
.idriss-note__expand { display: none; }

@media (max-width: 767px) {
  .idriss-note {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 24px);
    padding: 16px 16px 14px;
  }
  .idriss-note__title { font-size: 20px; }
  /* The generated site menu (nav.css) puts Book Now · Call · Menu in a fixed
     bar at the bottom of the phone screen: sit above it, never over it. */
  body.idn-page .idriss-note {
    bottom: calc(var(--idn-thumb, 60px) + var(--idn-safe, 0px) + 10px);
    max-height: calc(100vh - var(--idn-thumb, 60px) - var(--idn-safe, 0px) - var(--idn-mh, 60px) - 20px);
  }

  /* Collapsed bar: two short lines, Join, close. About 64px tall. */
  .idriss-note.is-collapsed {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "eyebrow join" "title join";
    align-items: center;
    column-gap: 12px;
    padding: 10px 52px 10px 16px;
  }
  .idriss-note.is-collapsed .idriss-note__eyebrow { grid-area: eyebrow; margin: 0 0 2px; }
  .idriss-note.is-collapsed .idriss-note__title { grid-area: title; margin: 0; font-size: 15px; line-height: 1.25; }
  .idriss-note.is-collapsed .idriss-note__expand { grid-area: join; display: block; padding: 0 18px; }
  .idriss-note.is-collapsed .idriss-note__panel { display: none; }
  .idriss-note.is-collapsed .idriss-note__close { top: 50%; transform: translateY(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .idriss-note { transition: none; transform: none; }
}
@media print {
  .idriss-note { display: none !important; }
}

/* Contact form: one-click "Also join" offered with the thank-you (forms.js).
   The form sits on a black panel, so light text and a white button. */
.idriss-contact-join { margin-top: 14px; font-size: 15px; line-height: 1.5; color: #fff; }
.idriss-contact-join p { margin: 0 0 10px; color: #fff; }
.idriss-contact-join .idriss-contact-join__btn,
.idriss-contact-join .idriss-contact-join__btn:active,
.idriss-contact-join .idriss-contact-join__btn:focus {
  position: static;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: inherit;
  cursor: pointer;
}

/* The sign-up consent line (wording: infra/forms/consent.mjs), under the footer
   form, in the Doctor's Note card and under the contact form's one-click join. */
.idriss-consent { margin: 8px 0 0; font-size: 12px; line-height: 1.5; }
.idriss-consent a { color: inherit; text-decoration: underline; }
/* The footer's line sits in .newsletter-submit-div, after the row with the Join
   button, so the theme's ".newsletter-submit-div > p" (the centred intro text:
   max-width 16.8vw / 221px, margins of ~5vw / 56px) would also style it. This
   selector out-ranks it: full width, left-aligned, small, close under the row. */
.newsletter-submit-div > p.idriss-consent { max-width: none; margin: 10px 0 0; text-align: left; font-size: 12px; line-height: 1.5; color: #fff; }
