/*
 * Additions on top of the extracted Divi stylesheet.
 *
 * Deliberately tiny: everything that shapes the page comes from the original
 * Divi CSS, which is shipped per page as-is. This file only covers behaviour
 * that only exists in the static build - the form validation states, and the
 * cookie banner.
 */

/* ------------------------------------------------------------------ *
 * forms
 * ------------------------------------------------------------------ */

.et-pb-contact-message {
  display: none;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 1.4;
}
.et-pb-contact-message.visible {
  display: block;
}
.et-pb-contact-message-success {
  background: #e6f6ec;
  border-left: 4px solid #14a44d;
  color: #0d5c2b;
}
.et-pb-contact-message-error {
  background: #fdecec;
  border-left: 4px solid #c62828;
  color: #8a1c1c;
}
.et-pb-contact-message-info {
  background: #eef3fb;
  border-left: 4px solid #0322a0;
  color: #1c2a5e;
}

.et_pb_contact_field [aria-invalid='true'] {
  border-color: #c62828 !important;
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.18);
}
.field-error {
  display: block;
  margin: 4px 0 0;
  color: #c62828;
  font-size: 13px;
  line-height: 1.3;
}
.et_pb_contact_submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ------------------------------------------------------------------ *
 * cookie consent
 * ------------------------------------------------------------------ */

#cookie-banner {
  position: fixed;
  z-index: 999999;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 20px;
  border-radius: 8px;
  background: #ffffff;
  color: #16233f;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
  font-size: 15px;
  line-height: 1.5;
  border-top: 4px solid #0322a0;
}
#cookie-banner[hidden] {
  display: none !important;
}
#cookie-banner h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-family: inherit;
  color: #0322a0;
}
#cookie-banner p {
  margin: 0 0 14px;
  padding: 0;
}
#cookie-banner a {
  color: #0322a0;
  text-decoration: underline;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cookie-actions button {
  flex: 0 0 auto;
  padding: 11px 22px;
  border: 2px solid #0322a0;
  border-radius: 100px;
  background: #0322a0;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.cookie-actions button.cookie-secondary {
  background: #fff;
  color: #0322a0;
}
.cookie-actions button.cookie-link {
  flex: 1 1 100%;
  order: 3;
  border: 0;
  background: none;
  color: #0322a0;
  text-decoration: underline;
  padding: 6px 0 0;
  font-weight: 400;
}
.cookie-actions button:hover {
  opacity: 0.9;
}
.cookie-actions button:focus-visible {
  outline: 3px solid #14d928;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  #cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 16px;
    font-size: 14px;
  }
  .cookie-actions button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #cookie-banner {
    animation: cookie-in 0.28s ease-out;
  }
  @keyframes cookie-in {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ------------------------------------------------------------------ *
 * visually hidden but available to crawlers and screen readers
 * (the boat pages' visible title is an <h2>, so the <h1> is carried here)
 * ------------------------------------------------------------------ */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
