/* GoliathTech floating widgets (contact + cookie consent) for the
   WordPress blog. Ported from the Vue app's ContactWidget.vue and
   CookieConsent.vue so the blog visually/behaviorally matches the main
   site. Uses plain CSS custom properties with fallback values, since
   the blog theme may not define --gt-yellow/--gt-black/etc. the same
   way the Vue app's global stylesheet does. Override the :root block
   below if the brand colors differ. */

:root {
  --gt-yellow: #ffc82c;
  --gt-black: #171717;
  --gt-white: #ffffff;
  --gt-font-nav: inherit;
  --gt-font-body: inherit;
}

/* ---------------------------------------------------------------- */
/* Contact widget (bottom-right yellow button + modal)                */
/* ---------------------------------------------------------------- */
.gt-contact-toggle {
  position: fixed;
  bottom: 15px;
  right: 15px;
  border: none;
  border-radius: 50%;
  background-color: var(--gt-yellow);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.49em;
  font-size: clamp(1.518125rem, 1.011875rem + 1.0546875vw, 2.2775rem);
  z-index: 999999;
  cursor: pointer;
}

.gt-contact-toggle__icon {
  width: 1em;
  height: 1em;
}

.gt-contact-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 7, 8, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999999;
}

.gt-contact-overlay[hidden],
.gt-cookie-overlay[hidden] {
  display: none !important;
}

/* The theme's global stylesheet forces a display value on all <svg>
   elements, which silently beats the browser's default "hidden attribute
   hides the element" behavior. Force it back explicitly for our icons. */
.gt-cookie-toggle__icon[hidden] {
  display: none !important;
}

.gt-contact-modal {
  position: relative;
  width: 560px;
  max-width: calc(100vw - 30px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px 32px 24px 32px;
  background: var(--gt-yellow);
  border-radius: 6px;
  text-align: left; /* overrides the theme's global body { text-align: center; } */
  scrollbar-width: thin;
  scrollbar-color: var(--gt-yellow) rgba(0, 0, 0, 0.15);
}

.gt-contact-modal::-webkit-scrollbar {
  width: 8px;
}

.gt-contact-modal::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.gt-contact-modal::-webkit-scrollbar-thumb {
  background-color: var(--gt-yellow);
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.gt-contact-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background: transparent;
  color: var(--gt-black);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gt-contact-modal__close:hover {
  border-color: var(--gt-yellow);
}

.gt-contact-modal__close:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed;
}

.gt-contact-modal__title {
  font-family: var(--gt-font-nav);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--gt-black);
  margin: 0 0 16px;
  max-width: 400px;
  text-align: left;
}

.gt-contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gt-contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gt-contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--gt-font-nav);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gt-black);
  text-align: left;
}

.gt-contact-form__field--full {
  width: 100%;
}

.gt-req {
  color: var(--gt-black);
  margin-right: 2px;
}

.gt-contact-form__field input,
.gt-contact-form__field textarea {
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.35);
  background: transparent;
  padding: 6px 2px;
  font-family: var(--gt-font-body);
  font-size: 0.95rem;
  color: var(--gt-black);
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}

.gt-contact-form__field input:focus,
.gt-contact-form__field textarea:focus {
  outline: none;
  border-bottom-color: var(--gt-black);
}

.gt-contact-form__message {
  margin: 0;
  font-family: var(--gt-font-nav);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.gt-contact-form__message--success {
  color: var(--gt-black);
}

.gt-contact-form__message--error {
  color: #8b0000;
}

.gt-contact-form__recaptcha {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  max-width: 100%;
  border-radius: 4px;
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.gt-contact-form__recaptcha-text {
  font-family: var(--gt-font-body);
  font-size: 0.7rem;
  line-height: 1.4;
  color: var(--gt-black);
}

.gt-contact-form__recaptcha-text a {
  color: #1a73e8;
  text-decoration: underline;
}

.gt-contact-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.gt-contact-form__call {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--gt-black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gt-contact-form__submit {
  font-family: var(--gt-font-nav);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gt-white);
  background-color: var(--gt-black);
  border: none;
  padding: 13px 26px;
  border-radius: 999px;
  transition: opacity 0.2s;
  cursor: pointer;
}

.gt-contact-form__submit:hover:not(:disabled) {
  opacity: 0.85;
}

.gt-contact-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- */
/* Cookie consent widget (bottom-left blue button + modal)            */
/* ---------------------------------------------------------------- */
.gt-cookie-toggle {
  position: fixed;
  bottom: 15px;
  left: 15px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  background-color: #0056A7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 999999;
  cursor: pointer;
}

.gt-cookie-toggle--scroll-top {
  background-color: var(--gt-black);
}

.gt-cookie-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 7, 8, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999999;
}

.gt-cookie-modal {
  width: 845px;
  max-width: calc(100vw - 30px);
  max-height: 79vh;
  border-radius: 6px;
  background-color: var(--gt-white);
  color: #212121;
  border: 1px solid #F4F4F4;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left; /* overrides the theme's global body { text-align: center; } */
}

.gt-cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid #F4F4F4;
}

.gt-cookie-modal__title {
  font-family: var(--gt-font-nav);
  font-size: 1.35rem;
  font-weight: 700;
  color: #212121;
  margin: 0;
  text-align: left;
}

.gt-cookie-modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d9d9d9;
  background: transparent;
  color: #212121;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.gt-cookie-modal__close:hover {
  border-color: var(--gt-yellow);
  color: var(--gt-black);
}

.gt-cookie-modal__body {
  padding: 20px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gt-cookie-modal__body p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4a4a4a;
  margin: 0;
}

.gt-cookie-showmore {
  background: none;
  border: none;
  padding: 0;
  margin-left: 4px;
  color: #2563eb;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.gt-cookie-showmore:hover {
  text-decoration: underline;
}

.gt-cookie-category {
  border-top: 1px solid #F4F4F4;
  padding-top: 16px;
}

.gt-cookie-category__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gt-cookie-category__name {
  font-family: var(--gt-font-nav);
  font-weight: 600;
  font-size: 1rem;
}

.gt-cookie-category__badge {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a8f4c;
}

.gt-cookie-category__desc {
  margin-top: 8px;
}

.gt-cookie-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.gt-cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.gt-cookie-switch__track {
  position: absolute;
  inset: 0;
  background-color: #d9d9d9;
  border-radius: 999px;
  transition: background-color 0.2s;
  cursor: pointer;
}

.gt-cookie-switch__track::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--gt-white);
  transition: transform 0.2s;
}

.gt-cookie-switch input:checked + .gt-cookie-switch__track {
  background-color: #0056A7;
}

.gt-cookie-switch input:checked + .gt-cookie-switch__track::before {
  transform: translateX(18px);
}

.gt-cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 28px;
  border-top: 1px solid #F4F4F4;
}

.gt-cookie-btn {
  flex: 1;
  min-width: 160px;
  padding: 13px 20px;
  border-radius: 999px;
  font-family: var(--gt-font-nav);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid #0056A7;
  transition: opacity 0.2s;
  cursor: pointer;
}

.gt-cookie-btn--outline {
  background: transparent;
  color: #0056A7;
}

.gt-cookie-btn--solid {
  background-color: #0056A7;
  color: var(--gt-white);
}

.gt-cookie-btn:hover {
  opacity: 0.85;
}

/* ---------------------------------------------------------------- */
/* Responsive                                                          */
/* ---------------------------------------------------------------- */
@media (max-width: 560px) {
  .gt-contact-modal {
    padding: 56px 20px 32px;
  }

  .gt-contact-form__row {
    grid-template-columns: 1fr;
  }

  .gt-cookie-modal__header,
  .gt-cookie-modal__body,
  .gt-cookie-modal__actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .gt-cookie-modal__actions {
    flex-direction: column;
  }

  .gt-cookie-btn {
    width: 100%;
  }
}

/* Hide the real floating reCAPTCHA badge — the required disclosure text
   is shown in its place inside the form, matching the Vue app. */
.grecaptcha-badge {
  visibility: hidden;
}