/* Modal trigger inherits the standard Bricks primary button styles
   (.bricks-button.bricks-background-primary). No extra rules needed. */

.advisor-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(640px, 92vw);
  max-width: 100%;
  height: fit-content;
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #001538;
  box-shadow: 0 30px 60px -20px rgba(0, 21, 56, 0.45);
  overflow: hidden;
  /* Belt-and-braces centering (in case an ancestor establishes a containing
     block for fixed positioning). */
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.advisor-modal[open] {
  animation: advisor-modal-in 0.18s ease-out forwards;
}

.advisor-modal::backdrop {
  background: rgba(0, 21, 56, 0.55);
  backdrop-filter: blur(2px);
}

@keyframes advisor-modal-in {
  from { opacity: 0; transform: translate(-50%, 8px) scale(0.98); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.advisor-modal__panel {
  position: relative;
  padding: 32px 32px 28px;
  max-height: 85vh;
  overflow-y: auto;
}

.advisor-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: #001538;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.advisor-modal__close:hover,
.advisor-modal__close:focus-visible {
  background: rgba(0, 21, 56, 0.08);
  outline: none;
}

.advisor-modal__title {
  margin: 0 0 16px;
  padding-right: 36px;
  color: #001538;
  /* font-size / weight / line-height inherit from the theme's h2 styles */
}

.advisor-modal__content {
  font-size: 16px;
  line-height: 1.55;
}

.advisor-modal__content :first-child { margin-top: 0; }
.advisor-modal__content :last-child  { margin-bottom: 0; }

.advisor-modal__content p,
.advisor-modal__content ul,
.advisor-modal__content ol {
  margin: 0 0 12px;
}

.advisor-modal__content a {
  color: #001538;
  text-decoration: underline;
}

.advisor-modal__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 600px) {
  .advisor-modal__panel { padding: 24px 20px 20px; }
}

/* Prevent background scroll while a modal is open */
body.advisor-modal-open { overflow: hidden; }
