/* modal.css */

/* =========================================
   Dashboard Modal / LLModal Shell
   ========================================= */

/* Root: JS may set display:block/none. Do not override with !important. */
#dashboard-modal.dashboard-modal,
.dashboard-modal {
  --modal-overlay-bg: rgba(0, 0, 0, 0.45);
  --modal-content-bg: #fff;
  --modal-max-w: 1100px;
  --modal-z: 12000;
  --radius-md: 8px;
  --shadow-modal: 0 4px 10px rgba(0,0,0,0.2);

  position: relative;
}

/* Overlay controls visual open/close */
.dashboard-modal .dashboard-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-overlay-bg);
  justify-content: center;
  align-items: center;
  z-index: var(--modal-z);
  overflow: auto;
  padding: 20px;
  box-sizing: border-box;
}

.dashboard-modal.is-open .dashboard-modal-overlay {
  display: flex;
}

/* Keep dashboard modal below WP Media modal */
#dashboard-modal .dashboard-modal-overlay {
  z-index: 100000;
}

/* Modal card */
.dashboard-modal .dashboard-modal-content {
  position: relative;
  background: var(--modal-content-bg);
  border-radius: var(--radius-md);
  width: 90vw;
  max-width: var(--modal-max-w);
  max-height: 95vh;
  overflow-y: auto;
  padding: 20px;
  box-shadow: var(--shadow-modal);
}

/* Close row pinned to top */
.dashboard-modal .modal-close-wrapper {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  z-index: calc(var(--modal-z) + 1);
  margin-bottom: -10px;
  pointer-events: none;
}

.dashboard-modal .modal-close-wrapper .close-popup {
  pointer-events: auto;
}

/* “X” button */
.dashboard-modal .close-popup {
  position: relative;
  top: -10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 18px;
  line-height: 1;
  color: #333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
  transition: background-color .2s ease, color .2s ease;
}

.dashboard-modal .close-popup:hover {
  background: #f0f0f0;
  color: #0073aa;
}

/* Headers / intro rows within modal */
.dashboard-modal .modal-header,
.dashboard-modal .dashboard-modal-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: inherit;
  padding: 10px;
  z-index: calc(var(--modal-z) + 1);
}

.dashboard-modal .dashboard-modal-header h2,
.dashboard-modal .dashboard-modal-header h3 {
  text-align: center;
}

/* Text blocks used in several modals */
.dashboard-modal .dashboard-modal-lines p,
.dashboard-modal .modal-lines p {
  margin: 4px 0;
  color: #555;
  text-align: left;
  font-size: 14px;
}

/* Modal form error messages */
#dashboard-modal-content-container .ll-error-msg,
#dashboard-modal-content-container #ll-email-status {
  margin-top: 8px;
  color: #dc2626;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

/* Payment modal content */
#dashboard-modal .payment-header {
  text-align: center;
}

#dashboard-modal .product-name {
  margin: 0;
  font-size: 1.5em;
}

#dashboard-modal .product-description {
  margin: 0.25em 0 1em;
  color: #555;
}

#dashboard-modal .total-due {
  margin-top: 0.5em;
}

/* Optional absolute-positioned close used in some legacy views */
#close-success-popup {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* Place ID proposal content */
.ll-place-id-proposal {
  font-size: 14px;
  line-height: 1.5;
}

.ll-place-id-proposal h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.ll-place-id-proposal p {
  margin: 6px 0;
}

.ll-place-id-proposal strong {
  color: #222;
}

.ll-place-id-proposal a {
  color: #0073aa;
  text-decoration: none;
}

.ll-place-id-proposal a:hover {
  text-decoration: underline;
}

.ll-place-id-proposal .actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* GBP conflict resolution modal */
.ll-gbp-conflict-resolution {
  max-width: 820px;
  margin: 0 auto;
}

.ll-gbp-conflict-resolution h2 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 28px;
  line-height: 1.2;
}

.ll-gbp-conflict-intro,
.ll-gbp-conflict-note {
  margin: 0 0 18px;
  color: #555;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}

.ll-gbp-conflict-list {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.ll-gbp-conflict-card {
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.ll-gbp-conflict-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.25;
}

.ll-gbp-conflict-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #d8dee6;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  margin: 10px 0;
}

.ll-gbp-conflict-option input[type="radio"] {
  margin-top: 4px;
  flex: 0 0 auto;
}

.ll-gbp-conflict-option span {
  display: block;
  min-width: 0;
}

.ll-gbp-conflict-option strong {
  display: block;
  color: #1f2937;
  margin-bottom: 4px;
}

.ll-gbp-conflict-option strong small {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e6f4ff;
  color: #0073aa;
  font-size: 12px;
  font-weight: 700;
}

.ll-gbp-conflict-option em {
  display: block;
  color: #374151;
  font-style: normal;
  overflow-wrap: anywhere;
}

.ll-gbp-conflict-option--recommended {
  border-color: #9cc9e2;
  background: #f0f8fc;
}

.ll-gbp-conflict-actions {
  margin-top: 22px;
}

.ll-bv-code {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 6px;
  margin-top: 10px;
  text-align: center;
}

/* Magic link sent modal */
.ll-magic-link-sent {
  position: relative;
}

.ll-magic-link-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ll-magic-link-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* WP Media modal z-index fixes */
.media-modal-backdrop {
  z-index: 160000 !important;
}

.media-modal-wrap,
.media-modal {
  z-index: 160010 !important;
}

.media-frame,
.media-frame-content {
  z-index: 160020 !important;
}

.media-modal-close {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  z-index: 160100 !important;
  pointer-events: auto !important;
}

.media-frame-title h1 {
  pointer-events: none !important;
}

@media (max-width: 767px) {
  .ll-gbp-conflict-resolution h2 {
    font-size: 24px;
  }

  .ll-gbp-conflict-card {
    padding: 14px;
  }

  .ll-gbp-conflict-actions {
    flex-direction: column;
  }

  .ll-gbp-conflict-actions .ll-btn {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .ll-magic-link-actions .ll-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .dashboard-modal .dashboard-modal-content {
    padding: 16px;
    width: 94vw;
  }
}

.ll-event-prompt-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ll-onboarding-idea-picker {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  text-align: left;
}

.ll-onboarding-idea-picker h2 {
  margin: 0 0 12px;
  font-size: 2rem;
  line-height: 1.2;
}

.ll-onboarding-idea-picker > p {
  margin: 0 0 12px;
  color: #444;
  line-height: 1.5;
}

.ll-onboarding-idea-picker .ll-onboarding-idea-picker__instruction {
  margin: 18px 0 12px;
  color: #222;
}

.ll-onboarding-idea-options {
  display: grid;
  gap: 12px;
}

.ll-onboarding-idea-option-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.ll-onboarding-idea-option-card:hover,
.ll-onboarding-idea-option-card.is-selected {
  border-color: #0073aa;
  background: #f2f8fc;
}

.ll-onboarding-idea-option-card input {
  flex: 0 0 auto;
}

.ll-onboarding-idea-option-card span {
  display: block;
}

.ll-onboarding-idea-option-card strong {
  display: block;
  font-size: 1.25rem;
}

.ll-onboarding-idea-option-card small {
  display: block;
  margin-top: 4px;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.35;
}

.ll-onboarding-idea-picker__actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.ll-onboard-buttons,
.dashboard-modal .ll-offer-suggestion-actions {
  margin-top: 22px;
}

@media (max-width: 700px) {
  .ll-onboarding-idea-picker {
    padding: 18px;
  }

  .ll-onboarding-idea-picker__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ll-onboarding-idea-picker__actions .ll-btn--primary {
    order: -1;
    width: 100%;
  }

  .ll-onboarding-idea-picker__actions .ll-btn--ghost,
  .ll-onboarding-idea-picker__actions .ll-btn--link {
    align-self: center;
    width: auto;
  }
}

/* Business finder needs enough room to keep Google predictions visible. */
#dashboard-modal:has(#dashboard-modal-content-container[data-modal-role="business_finder"]) .dashboard-modal-content {
  width: min(96vw, 1200px);
  max-width: 1200px;
  min-height: min(760px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
}

#dashboard-modal:has(#dashboard-modal-content-container[data-modal-role="business_finder"]) #dashboard-modal-content-container {
  min-height: 640px;
}

@media (max-width: 680px) {
  #dashboard-modal:has(#dashboard-modal-content-container[data-modal-role="business_finder"]) .dashboard-modal-content {
    width: calc(100vw - 20px);
    min-height: calc(100vh - 20px);
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  #dashboard-modal:has(#dashboard-modal-content-container[data-modal-role="business_finder"]) #dashboard-modal-content-container {
    min-height: 0;
  }
}


/* =========================================
   Newsletter confirmation/status cards
   Mirrors the city subscription-confirmed card hierarchy.
   ========================================= */

.dashboard-modal .dashboard-modal-content.ll-confirmation-shell {
  width: min(760px, calc(100vw - 32px));
  max-width: 760px;
  padding: 0;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid #d9e2ea;
  border-radius: 18px;
  box-shadow: 0 20px 54px rgba(20, 33, 45, 0.2);
}

.dashboard-modal .dashboard-modal-content.ll-confirmation-shell .modal-close-wrapper {
  position: absolute;
  top: 18px;
  right: 18px;
  width: auto;
  margin: 0;
  z-index: 3;
}

.dashboard-modal .dashboard-modal-content.ll-confirmation-shell .close-popup {
  top: 0;
  width: 32px;
  height: 32px;
  border-color: #d9e2ea;
  box-shadow: 0 2px 7px rgba(20, 33, 45, 0.12);
}

.dashboard-modal .dashboard-modal-content.ll-confirmation-shell #dashboard-modal-content-container {
  padding: 0;
}

.ll-confirmation-card {
  box-sizing: border-box;
  width: 100%;
  padding: 46px;
  color: #172033;
  background: #fff;
  border-radius: 18px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
}

.ll-confirmation-card__icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 0 20px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  font-size: 1.75rem;
  font-weight: 850;
  line-height: 1;
}

.ll-confirmation-card__icon--success {
  background: #147a4b;
}

.ll-confirmation-card__icon--mail {
  background: #176eb5;
}

.ll-confirmation-card__eyebrow {
  display: block;
  margin: 0 0 8px;
  color: #176eb5;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ll-confirmation-card h2 {
  margin: 0 0 16px;
  color: #202532;
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-align: left;
}

.ll-confirmation-card p,
.ll-confirmation-card li {
  font-size: 16px;
  line-height: 1.6;
}

.ll-confirmation-card__lead {
  margin: 0 0 14px;
  color: #202532;
  font-weight: 700;
}

.ll-confirmation-card__email {
  overflow-wrap: anywhere;
}

.ll-confirmation-card__help {
  margin-top: 22px;
  color: #4c5565;
}

.ll-confirmation-card__help ul {
  margin: 10px 0 18px;
  padding-left: 22px;
}

.ll-confirmation-card__resend {
  margin-bottom: 0;
}

.ll-confirmation-card__resend a {
  font-weight: 700;
}

/* Compact pending-confirmation heading: mail icon and action-oriented title on one line. */
.ll-confirmation-card__heading-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
}

.ll-confirmation-card__heading-row .ll-confirmation-card__icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  margin: 0;
  font-size: 1.25rem;
}

.dashboard-modal .ll-confirmation-card__heading-row h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.ll-confirmation-business-cta {
  margin: 30px 0 0;
  padding: 22px;
  background: #f4f9fd;
  border: 2px solid #b8d5eb;
  border-radius: 12px;
  text-align: center;
}

.dashboard-modal .ll-confirmation-business-cta__question {
  margin: 0 0 11px;
  color: #202532;
  font-size: 17px;
  font-weight: 750;
}

.dashboard-modal .ll-confirmation-business-cta__button {
  display: inline-block;
  max-width: 100%;
  text-decoration: none;
  white-space: normal;
}

@media (max-width: 620px) {
  .dashboard-modal .dashboard-modal-content.ll-confirmation-shell {
    width: calc(100vw - 24px);
  }

  .ll-confirmation-card {
    padding: 34px 24px 26px;
  }

  .ll-confirmation-card__icon {
    width: 54px;
    height: 54px;
  }

  .ll-confirmation-card__heading-row {
    gap: 11px;
  }

  .ll-confirmation-card__heading-row .ll-confirmation-card__icon {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
  }

  .ll-confirmation-business-cta {
    padding: 18px 14px;
  }

  .ll-confirmation-business-cta__button {
    width: 100%;
    box-sizing: border-box;
  }
}
