/**
 * TSW "Request a Proposal" Slide-in Inquiry Panel
 *
 * Slides in from the right on desktop, full-screen on mobile.
 * Brand colours (green / Qilka) — matches the reference flow.
 *
 * @package TSW
 * @since   1.0.0
 */

/* ── Trigger buttons ─────────────────────────────── */
.tsw-req-proposal { cursor: pointer; }

/* Floating "Request Proposal" button (replaces the old popup/WhatsApp FABs) */
.tsw-inq-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 50px;
  background: var(--tsw-green, #44b968);
  color: #fff;
  border: none;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(68, 185, 104, .38);
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.tsw-inq-fab i { font-size: 1.05rem; }

.tsw-inq-fab:hover {
  background: var(--tsw-green-dark, #3aa35b);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(68, 185, 104, .45);
}

/* Mobile: icon-only circle to stay out of the way */
@media (max-width: 575px) {
  .tsw-inq-fab {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .tsw-inq-fab span { display: none; }
}

/* Mobile header balance — smaller logo so logo / button / menu icon match */
@media (max-width: 991.98px) {
  .tsw-navbar .tsw-logo,
  .tsw-navbar__brand .tsw-logo { max-height: 30px; width: auto; }
  .tsw-mobile-actions { gap: 8px; }
  .tsw-lets-talk { padding: 7px 14px; font-size: .78rem; }
}

.tsw-mobile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tsw-lets-talk {
  background: var(--tsw-green, #44b968);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}

.tsw-lets-talk:hover,
.tsw-lets-talk:active {
  background: var(--tsw-green-dark, #3aa35b);
  transform: translateY(-1px);
  color: #fff;
}

/* ── Overlay + Panel ─────────────────────────────── */
.tsw-inq-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}

.tsw-inq-overlay.active {
  opacity: 1;
  visibility: visible;
}

.tsw-inq-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 12001;
  width: min(560px, 100%);
  height: 100%;
  background: linear-gradient(160deg, #173021 0%, #0e2016 100%);
  box-shadow: -24px 0 70px rgba(0, 0, 0, .45);
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.16, 1, .3, 1);
  overflow-y: auto;
  color: #fff;
}

.tsw-inq-panel.active { transform: translateX(0); }

.tsw-inq-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .22);
  color: rgba(255, 255, 255, .8);
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
}

.tsw-inq-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.tsw-inq-inner { padding: 58px 44px 44px; }

/* ── Header ──────────────────────────────────────── */
.tsw-inq-head { margin-bottom: 26px; }

.tsw-inq-title {
  font-family: var(--ff-display, 'Qilka', serif);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.12;
  color: #fff;
  margin: 0 0 8px;
}

.tsw-inq-sub {
  color: var(--tsw-green-bright, #95bf47);
  font-weight: 600;
  font-size: .95rem;
  margin: 0;
}

/* ── Fields (floating labels) ────────────────────── */
.tsw-inq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 18px;
  margin-bottom: 26px;
}

.tsw-inq-field { position: relative; }
.tsw-inq-field--full { grid-column: 1 / -1; }

.tsw-inq-field input,
.tsw-inq-field textarea,
.tsw-inq-select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: .95rem;
  padding: 8px 0;
  font-family: var(--ff-body, inherit);
}

.tsw-inq-field input:focus,
.tsw-inq-field textarea:focus,
.tsw-inq-select:focus {
  outline: none;
  border-bottom-color: var(--tsw-green-bright, #95bf47);
}

/* Kill the browser autofill light box — keep transparent look + white text */
.tsw-inq-field input:-webkit-autofill,
.tsw-inq-field input:-webkit-autofill:hover,
.tsw-inq-field input:-webkit-autofill:focus,
.tsw-inq-field input:-webkit-autofill:active,
.tsw-inq-field textarea:-webkit-autofill,
.tsw-inq-select:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #143025 inset;
  box-shadow: 0 0 0 1000px #143025 inset;
  border-bottom-color: rgba(255, 255, 255, .4);
  transition: background-color 100000s ease-in-out 0s;
}

/* Float the label when a field has been autofilled */
.tsw-inq-field input:-webkit-autofill + label,
.tsw-inq-field textarea:-webkit-autofill + label {
  top: -13px;
  font-size: .72rem;
  color: rgba(255, 255, 255, .6);
}

.tsw-inq-field label {
  position: absolute;
  left: 0;
  top: 8px;
  color: rgba(255, 255, 255, .5);
  font-size: .95rem;
  pointer-events: none;
  transition: all .2s ease;
}

.tsw-inq-field label span { color: var(--tsw-green-bright, #95bf47); }

.tsw-inq-field input:focus + label,
.tsw-inq-field input:not(:placeholder-shown) + label,
.tsw-inq-field textarea:focus + label,
.tsw-inq-field textarea:not(:placeholder-shown) + label {
  top: -13px;
  font-size: .72rem;
  color: rgba(255, 255, 255, .6);
}

.tsw-inq-field--textarea { margin-bottom: 22px; }
.tsw-inq-field--textarea textarea { resize: vertical; min-height: 44px; }

/* Select */
.tsw-inq-select {
  appearance: none;
  color: rgba(255, 255, 255, .5);
  cursor: pointer;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2395bf47' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

.tsw-inq-select:required:valid { color: #fff; }
.tsw-inq-select option { color: #1a1a2e; }

/* ── Help My Business (checkboxes) ───────────────── */
.tsw-inq-block { margin-bottom: 26px; }

.tsw-inq-block-title {
  font-family: var(--ff-display, 'Qilka', serif);
  font-size: 1.35rem;
  color: #fff;
  margin: 0 0 14px;
}

.tsw-inq-block-title span { color: var(--tsw-green-bright, #95bf47); }

.tsw-inq-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.tsw-inq-check,
.tsw-inq-optin {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, .85);
  font-size: .88rem;
  line-height: 1.4;
}

.tsw-inq-check input,
.tsw-inq-optin input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tsw-inq-check-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, .3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: .78rem;
  margin-top: 1px;
  transition: all .2s ease;
}

.tsw-inq-check input:checked + .tsw-inq-check-box,
.tsw-inq-optin input:checked + .tsw-inq-check-box {
  background: var(--tsw-green, #44b968);
  border-color: var(--tsw-green, #44b968);
  color: #fff;
}

.tsw-inq-optin {
  margin-bottom: 22px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .68);
}

/* ── Submit ──────────────────────────────────────── */
.tsw-inq-submit {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: var(--tsw-green, #44b968);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.tsw-inq-submit:hover {
  background: var(--tsw-green-dark, #3aa35b);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(68, 185, 104, .3);
}

.tsw-inq-submit:disabled { opacity: .7; cursor: default; transform: none; }

.tsw-inq-contact { margin-top: 16px; text-align: center; }

.tsw-inq-contact a {
  color: var(--tsw-green-bright, #95bf47);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
}

/* ── Errors ──────────────────────────────────────── */
.tsw-inq-form .tsw-field-error {
  color: #ff9a9a;
  font-size: .74rem;
  margin-top: 4px;
  display: none;
}

.tsw-inq-form .tsw-field-error.active { display: block; }

/* ── Success ─────────────────────────────────────── */
.tsw-inq-success { text-align: center; padding: 50px 10px; }

.tsw-inq-success-icon {
  display: inline-block;
  font-size: 3rem;
  color: var(--tsw-green-bright, #95bf47);
}

.tsw-inq-success h3 {
  font-family: var(--ff-display, 'Qilka', serif);
  color: #fff;
  margin: 16px 0 8px;
}

.tsw-inq-success p { color: rgba(255, 255, 255, .72); line-height: 1.6; }

/* Lock page scroll while open */
body.tsw-inq-open { overflow: hidden; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 575px) {
  .tsw-inq-panel { width: 100%; }
  .tsw-inq-inner { padding: 56px 22px 32px; }
  .tsw-inq-grid { grid-template-columns: 1fr; gap: 22px; margin-bottom: 22px; }
  .tsw-inq-checks { grid-template-columns: 1fr; gap: 12px; }
  .tsw-inq-title { font-size: 1.75rem; }
  .tsw-inq-block-title { font-size: 1.2rem; }
}
