/* ===================================================
   Sticky Connect Bar – Frontend Styles
   =================================================== */

/* ── Bar ──────────────────────────────────────────── */
.scb-bar {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
  box-sizing: border-box;
  transform: translateY(100%);
  opacity: 0;
  transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .4s ease;
}

.scb-bar.scb-anim-top {
  transform: translateY(-100%);
}

.scb-bar.scb-visible {
  transform: translateY(0) !important;
  opacity: 1;
}

/* fade variant */
.scb-bar.scb-fade {
  transform: none !important;
  transition: opacity .4s ease;
}
.scb-bar.scb-fade.scb-visible {
  opacity: 1;
}

.scb-bar-label {
  font-size: 14px;
  font-weight: 600;
  margin-right: 16px;
  white-space: nowrap;
  opacity: .9;
}

.scb-bar-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Buttons ──────────────────────────────────────── */
.scb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: .02em;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  text-decoration: none;
  outline: none;
}

.scb-btn:hover,
.scb-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.scb-btn:active {
  transform: translateY(0);
}

.scb-btn-icon {
  font-size: 1.1em;
  line-height: 1;
}

/* Dismiss button */
.scb-dismiss {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  transition: color .2s;
}
.scb-dismiss:hover { color: #fff; }

/* ── Overlay ──────────────────────────────────────── */
.scb-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
  box-sizing: border-box;
  animation: scbFadeIn .25s ease;
}

@keyframes scbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Popup ────────────────────────────────────────── */
.scb-popup {
  position: relative;
  width: 100%;
  padding: 32px 36px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  box-sizing: border-box;
  animation: scbSlideUp .3s cubic-bezier(.4,0,.2,1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes scbSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.scb-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  transition: all .2s;
  line-height: 1;
  padding: 0;
}
.scb-popup-close:hover {
  background: #f3f4f6;
  color: #111;
  border-color: #d1d5db;
}

/* ── Popup Header ─────────────────────────────────── */
.scb-popup-header {
  margin-bottom: 24px;
}

.scb-popup-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.scb-popup-sub {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
}

/* Badge showing phone/whatsapp context */
.scb-form-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 99px;
  margin-top: 8px;
}
.scb-form-badge.badge-phone    { background:#dbeafe; color:#1d4ed8; }
.scb-form-badge.badge-whatsapp { background:#dcfce7; color:#15803d; }

/* ── Form Fields ──────────────────────────────────── */
.scb-form { display: flex; flex-direction: column; gap: 14px; }

.scb-field { display: flex; flex-direction: column; gap: 5px; }

.scb-field label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.scb-req { color: #ef4444; margin-left: 2px; }

.scb-field input,
.scb-field select,
.scb-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #111827;
  background: #f9fafb;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  font-family: inherit;
}

.scb-field input:focus,
.scb-field select:focus,
.scb-field textarea:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.scb-field input.scb-error,
.scb-field select.scb-error,
.scb-field textarea.scb-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

.scb-field textarea { resize: vertical; min-height: 80px; }

/* Radio group */
.scb-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.scb-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
  color: #374151;
  font-weight: 400;
}
.scb-radio-label input[type="radio"] { accent-color: #2563eb; }

/* Error message */
.scb-form-error {
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 13px;
}

/* ── Submit Button ────────────────────────────────── */
.scb-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: opacity .2s, transform .2s;
  margin-top: 6px;
  font-family: inherit;
}
.scb-submit:hover  { opacity: .92; transform: translateY(-1px); }
.scb-submit:active { transform: translateY(0); }
.scb-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ── Success State ────────────────────────────────── */
.scb-success {
  text-align: center;
  padding: 20px 0 10px;
}
.scb-success-icon {
  font-size: 52px;
  margin-bottom: 12px;
  animation: scbBounce .5s ease;
}
@keyframes scbBounce {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}
.scb-success p {
  font-size: 17px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 6px;
}
.scb-success-sub {
  font-size: 13px !important;
  color: #6b7280 !important;
  font-weight: 400 !important;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
  .scb-popup {
    padding: 24px 20px 28px;
    border-radius: 16px 16px 0 0 !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 92vh;
    margin: 0;
  }
  .scb-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .scb-bar-label { display: none; }
  .scb-btn { font-size: 13px !important; padding: 10px 16px !important; }
}

/* ── Accessibility ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .scb-bar,
  .scb-popup,
  .scb-overlay { animation: none !important; transition: none !important; }
}
