/* Contact form (napiste-nam) — ported from the original
   mod_super_simple_contact_form stylesheet, plus the page-specific
   overrides the original template applied inline (blue pill submit). */

[id^="wrap-contact-form"] p.success {
  margin: 0 0 5px;
  font-size: 110%;
  font-weight: bold;
  letter-spacing: -0.05px;
}

[id^="wrap-contact-form"] p.error {
  color: #dc0000;
  margin: 0 0 5px;
}

[id^="wrap-contact-form"] .success {
  color: #0ba300;
  line-height: 1;
}

/* Gap between the intro paragraph and the form — replicates the original
   spacing (measured against the reference: paragraph bottom → first input
   top = 56px). */
#wrap-contact-form {
  margin-top: 56px;
}

.sscf-form {
  font-size: 1.15em;
  position: relative;
}

.sscf-form .fl_wrap {
  height: 46px;
  margin-bottom: 10px;
  display: block;
  position: relative;
  box-sizing: border-box;
}

.fl_wrap_textarea {
  height: 200px !important;
}

.sscf-form .fl_label {
  cursor: text;
  top: 23px;
  font-family: Helvetica, Arial, sans-serif;
  line-height: 0;
  font-weight: normal;
  height: 0;
  left: 14px;
  color: #8c8c8c;
  font-size: 15px;
  transform-origin: 0 -35px;
  position: absolute;
  pointer-events: none;
  z-index: 3;
  transition: all 120ms;
}

.sscf-form .fl_label:focus {
  outline: 0;
  border: none;
}

.sscf-form .sscf-input {
  background: none;
  border: 1px solid lightgrey;
  outline: none;
  border-radius: 5px;
  font-size: 15px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: normal;
  height: 46px;
  line-height: 22px;
  padding: 20px 0 5px 14px;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 2;
  box-sizing: border-box;
}

.sscf-form textarea.sscf-input {
  padding: 20px 14px 5px;
}

.sscf-form textarea,
.input.textarea {
  height: 200px !important;
  color: #555;
}

input:focus,
textarea:focus {
  border-color: #969696 !important;
  box-shadow: none !important;
}

/* Floating labels — CSS-only equivalent of the original's jQuery
   .focused/.populated classes (fields carry placeholder=" "). */
.sscf-form .fl_wrap:focus-within .fl_label,
.sscf-form .sscf-input:not(:placeholder-shown) + .fl_label {
  color: #c6c6c6;
  transform: scale(0.7, 0.7);
}

.sscf-form .fl_wrap:focus-within .fl_label {
  color: #8c8c8c;
}

/* Server-side validation errors — the controller adds .sscf-valid-error
   to the wrapper and .error to the input. */
.sscf-error {
  font-family: Helvetica, Arial, sans-serif;
  display: block;
  position: absolute;
  line-height: 0;
  margin: 0;
  height: 0;
  padding: 0 !important;
  font-size: 10px !important;
  z-index: 90;
  margin-top: 12px;
  right: 15px;
  color: #dc0000;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
}

.sscf-valid-error .sscf-error {
  opacity: 1;
}

.sscf-input.error {
  border-color: #dc0000 !important;
}

/* Submit button — original module style with the page overrides
   (#5782ae / hover #9e9e9e / border-radius 25px, as rendered by the
   original site). line-height 20px reproduces the measured 40px height. */
.rf_submit {
  background: #5782ae;
  border: none;
  border-radius: 25px;
  color: #fff;
  font-size: 15px;
  line-height: 20px;
  padding: 10px 25px;
  display: block;
  margin: 20px 0;
  transition: all 0.4s ease;
}

.rf_submit:hover {
  cursor: pointer;
  background: #9e9e9e;
}

.rf_submit:focus {
  outline: none;
}

.rf_submit:focus-visible {
  outline: 2px solid #5782ae;
  outline-offset: 2px;
}

/* Honeypot — off-screen rather than display:none, so naive bots fill it. */
.contact-honeypot {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

/* GDPR modal — long legal text (port of the client's gdpr.html); the dialog is
   modal-lg and the body scrolls on its own.
   Note: `#container_main .wrapper960 div { overflow: visible }` (main.css) also
   matches every modal div and out-specifies Bootstrap's modal-dialog-scrollable
   rules — hence the (1,2,1) selectors below. */
#gdpr-modal .modal-dialog .modal-content {
  overflow: hidden;
}

#gdpr-modal .modal-dialog .modal-body {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

#gdpr-modal .modal-body h6 {
  font-size: 14px;
  font-weight: bold;
  color: #495057;
  margin: 1.25rem 0 0.5rem;
}

#gdpr-modal .modal-body p {
  margin-bottom: 0.5rem;
}

#gdpr-modal .modal-body ul,
#gdpr-modal .modal-body ol {
  margin-bottom: 0.5rem;
  padding-left: 22px;
}

#gdpr-modal .modal-body li {
  margin-bottom: 0.35rem;
}

#gdpr-modal .modal-body li > ul,
#gdpr-modal .modal-body li > ol,
#gdpr-modal .modal-body li > p {
  margin: 0.35rem 0 0;
}

@media screen and (max-width: 420px) {
  span.sscf-error {
    display: none !important;
  }
}
