/* ═══════════════════════════════════════════════════════════
   SITE CONTROLS — S&A Solutions
   Floating bubble + panel, language popup, cookie banner
   ═══════════════════════════════════════════════════════════ */

/* ── Floating bubble (bottom-right) ── */
.sa-bubble {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: #15241b;
  color: #faf3e3;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(21, 36, 27, 0.25), 0 4px 10px rgba(0,0,0,.1);
  z-index: 9998;
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s ease;
  font-family: 'GeneralSans', 'Inter', sans-serif;
}
.sa-bubble:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 14px 36px rgba(21, 36, 27, 0.35), 0 4px 12px rgba(0,0,0,.12);
}
.sa-bubble svg {
  width: 1.45rem;
  height: 1.45rem;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.sa-bubble:hover svg {
  transform: rotate(45deg);
}

/* ── Panel (slides up from bubble) ── */
.sa-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 19rem;
  max-width: calc(100vw - 3rem);
  background: #faf3e3;
  border-radius: 1.25rem;
  box-shadow: 0 24px 60px rgba(21,36,27,.22), 0 4px 14px rgba(0,0,0,.08);
  z-index: 9997;
  font-family: 'GeneralSans', 'Inter', sans-serif;
  opacity: 0;
  transform: translateY(.5rem) scale(.97);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.sa-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.sa-panel-header {
  padding: 1.1rem 1.25rem .85rem;
  border-bottom: 1px solid rgba(21,36,27,.08);
}
.sa-panel-title {
  font-family: 'Marcellus', serif;
  font-size: 1.1rem;
  color: #15241b;
  margin: 0 0 .15rem;
  letter-spacing: -.01rem;
}
.sa-panel-sub {
  font-size: .8rem;
  color: rgba(21,36,27,.6);
  margin: 0;
}
.sa-panel-section {
  padding: .9rem 1.25rem;
  border-bottom: 1px solid rgba(21,36,27,.08);
}
.sa-panel-section:last-child { border-bottom: none; }
.sa-panel-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(21,36,27,.5);
  margin-bottom: .55rem;
}

/* ── Language toggle ── */
.sa-lang-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  background: rgba(21,36,27,.06);
  border-radius: .5rem;
  padding: .25rem;
}
.sa-lang-btn {
  background: transparent;
  border: none;
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  padding: .55rem 0;
  border-radius: .375rem;
  color: rgba(21,36,27,.7);
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: inherit;
}
.sa-lang-btn:hover { color: #15241b; }
.sa-lang-btn.is-active {
  background: #15241b;
  color: #faf3e3;
}

/* ── Contact quick-actions ── */
.sa-quick-row {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.sa-quick-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: .5rem;
  background: #fff;
  text-decoration: none;
  color: #15241b;
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s, transform .15s;
  border: 1px solid rgba(21,36,27,.08);
}
.sa-quick-link:hover {
  background: #f1ece0;
  transform: translateY(-1px);
}
.sa-quick-link svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: #15241b;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sa-quick-link-text { display: flex; flex-direction: column; line-height: 1.2; }
.sa-quick-link-sub {
  font-size: .68rem;
  color: rgba(21,36,27,.55);
  font-weight: 500;
  margin-top: .1rem;
}

/* ── Inline action (cookie reset button) ── */
.sa-inline-action {
  background: transparent;
  border: 1px solid rgba(21,36,27,.18);
  font: inherit;
  font-size: .8rem;
  font-weight: 500;
  padding: .5rem .85rem;
  border-radius: .4rem;
  color: #15241b;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  font-family: inherit;
}
.sa-inline-action:hover {
  background: rgba(21,36,27,.06);
  border-color: rgba(21,36,27,.3);
}

/* ── Modal backdrop (for language popup + cookie banner overlays) ── */
.sa-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 25, 19, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.sa-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.sa-modal {
  background: #faf3e3;
  border-radius: 1.25rem;
  max-width: 26rem;
  width: 100%;
  padding: 2rem 1.75rem 1.5rem;
  font-family: 'GeneralSans', 'Inter', sans-serif;
  transform: translateY(1rem) scale(.97);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 28px 60px rgba(0,0,0,.3);
}
.sa-modal-backdrop.is-open .sa-modal {
  transform: translateY(0) scale(1);
}
.sa-modal-title {
  font-family: 'Marcellus', serif;
  font-size: 1.4rem;
  color: #15241b;
  margin: 0 0 .5rem;
  letter-spacing: -.02rem;
  line-height: 1.25;
}
.sa-modal-text {
  font-size: .9rem;
  line-height: 1.6;
  color: rgba(21,36,27,.7);
  margin: 0 0 1.25rem;
}
.sa-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin-top: 1rem;
}

/* ── Language picker (two-step popup) ── */
.sa-lang-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin: 1.25rem 0 1.25rem;
}
.sa-lang-option {
  position: relative;
  background: #fff;
  border: 2px solid rgba(21,36,27,.12);
  border-radius: .75rem;
  padding: 1.1rem .85rem 1rem;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  transition: border-color .2s, transform .15s, box-shadow .2s, background .2s;
}
.sa-lang-option:hover {
  border-color: rgba(21,36,27,.3);
  transform: translateY(-1px);
}
.sa-lang-option.is-selected {
  border-color: #15241b;
  background: #15241b;
  color: #faf3e3;
  box-shadow: 0 6px 18px rgba(21,36,27,.18);
}
.sa-lang-flag {
  font-size: 1.85rem;
  line-height: 1;
}
.sa-lang-name {
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: inherit;
}
.sa-lang-check {
  position: absolute;
  top: .55rem;
  right: .55rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 1.5px solid rgba(21,36,27,.2);
  transition: background .2s, border-color .2s;
}
.sa-lang-option.is-selected .sa-lang-check {
  background: #faf3e3;
  border-color: #faf3e3;
  position: relative;
}
.sa-lang-option.is-selected .sa-lang-check::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315241b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70%;
}
.sa-confirm-btn {
  width: 100%;
  display: block;
  margin-top: .5rem;
}
.sa-btn {
  font: inherit;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .8rem 1rem;
  border-radius: .5rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s, transform .15s, border-color .2s;
  text-decoration: none;
  text-align: center;
}
.sa-btn-primary {
  background: #15241b;
  color: #faf3e3;
  border-color: #15241b;
}
.sa-btn-primary:hover {
  background: #1e3328;
  transform: translateY(-1px);
}
.sa-btn-secondary {
  background: transparent;
  color: #15241b;
  border-color: rgba(21,36,27,.25);
}
.sa-btn-secondary:hover {
  background: rgba(21,36,27,.06);
  border-color: rgba(21,36,27,.4);
}

/* ── Cookie banner (bottom strip) ── */
.sa-cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 6.5rem;
  max-width: 32rem;
  background: #15241b;
  color: #faf3e3;
  padding: 1.1rem 1.25rem;
  border-radius: 1rem;
  font-family: 'GeneralSans', 'Inter', sans-serif;
  font-size: .85rem;
  line-height: 1.55;
  z-index: 9996;
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
  display: flex;
  flex-direction: column;
  gap: .85rem;
  transform: translateY(1.5rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .35s cubic-bezier(.4,0,.2,1);
}
.sa-cookie-banner.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.sa-cookie-banner a {
  color: #faf3e3;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sa-cookie-row {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.sa-cookie-btn {
  font: inherit;
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .65rem 1rem;
  border-radius: .45rem;
  cursor: pointer;
  border: 1px solid rgba(250,243,227,.25);
  background: transparent;
  color: #faf3e3;
  transition: background .2s, border-color .2s;
}
.sa-cookie-btn:hover {
  background: rgba(250,243,227,.1);
  border-color: rgba(250,243,227,.5);
}
.sa-cookie-btn.is-primary {
  background: #faf3e3;
  color: #15241b;
  border-color: #faf3e3;
}
.sa-cookie-btn.is-primary:hover {
  background: #fff;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .sa-bubble { bottom: 1rem; right: 1rem; width: 3.1rem; height: 3.1rem; }
  .sa-bubble svg { width: 1.2rem; height: 1.2rem; }
  .sa-panel { right: 1rem; bottom: 4.8rem; width: calc(100vw - 2rem); }
  .sa-cookie-banner { left: 1rem; right: 1rem; bottom: 5rem; }
}
