/* ==========================================================================
   OffboardSafe Contact Popup Widget
   Lightweight, self-contained styles. No external dependencies.
   ========================================================================== */

#obs-popup, #obs-popup * { box-sizing: border-box; }

#obs-popup {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: #1f2937;
  animation: obs-pop-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes obs-pop-in {
  from { transform: translateY(16px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---- Header ---- */
.obs-popup-header {
  position: relative;
  background: #04445C;
  color: #ffffff;
  padding: 18px 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.obs-popup-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
  overflow: hidden;
}
.obs-popup-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
/* Logo icon (replaces photo avatar) */
.obs-popup-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.obs-popup-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.obs-popup-headtext { line-height: 1.35; }
.obs-popup-headtext .obs-hi {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.obs-popup-headtext .obs-tag {
  margin: 3px 0 0;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}
.obs-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.obs-popup-close:hover { background: rgba(255, 255, 255, 0.3); }

/* ---- Body / Form ---- */
.obs-popup-body { padding: 16px 18px 18px; }

.obs-popup-body .obs-field { margin-bottom: 10px; }

.obs-popup-body input,
.obs-popup-body textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2937;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.obs-popup-body input:focus,
.obs-popup-body textarea:focus {
  outline: none;
  border-color: #04445C;
  box-shadow: 0 0 0 3px rgba(4, 68, 92, 0.12);
}
.obs-popup-body textarea { resize: vertical; min-height: 72px; }

/* Honeypot - visually hidden but present in DOM */
.obs-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.obs-popup-submit {
  width: 100%;
  padding: 11px 14px;
  background: #04445C;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.obs-popup-submit:hover { background: #065a78; }
.obs-popup-submit:disabled { opacity: 0.6; cursor: default; }

.obs-popup-note {
  margin: 9px 0 0;
  font-size: 11.5px;
  color: #9ca3af;
  text-align: center;
}
.obs-popup-error {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #b91c1c;
  display: none;
}

/* ---- Success state ---- */
.obs-popup-success { display: none; padding: 24px 20px 26px; text-align: center; }
.obs-popup-success .obs-check {
  width: 52px; height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #dcfce7;
  color: #166534;
  display: flex; align-items: center; justify-content: center;
}
.obs-popup-success h4 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #04445C;
}
.obs-popup-success p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: #4b5563;
  line-height: 1.5;
}
.obs-popup-success .obs-demo-btn {
  display: inline-block;
  padding: 10px 22px;
  background: #04445C;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.obs-popup-success .obs-demo-btn:hover { background: #065a78; }

/* ---- Floating reopen bubble ---- */
#obs-popup-bubble {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #04445C;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(4, 68, 92, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
#obs-popup-bubble:hover { transform: scale(1.06); background: #065a78; }
#obs-popup-bubble svg { width: 24px; height: 24px; }

/* ---- Mobile ---- */
@media (max-width: 480px) {
  #obs-popup {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    max-width: 360px;
    max-height: 78vh;
    overflow-y: auto;
    border-radius: 16px;
  }
  #obs-popup-bubble { right: 16px; bottom: 16px; }
}

/* ==========================================================================
   Cookie Consent Banner
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10001;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(4, 68, 92, .11);
  padding: 8px 0;
  transform: translateY(110%);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}
.cookie-banner.visible {
  transform: translateY(0);
}
.cookie-banner-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}
.cookie-banner-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}
.cookie-banner-text {
  flex: 1;
  min-width: 0;
}
.cookie-banner-text p {
  margin: 0;
  font-size: 12.5px;
  color: #33454f;
  line-height: 1.45;
}
.cookie-banner-text a {
  color: #04445C;
  text-decoration: underline;
  font-weight: 600;
}
.cookie-banner-text a:hover { color: #065a78; }
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: center;
}
.cookie-btn {
  padding: 6px 15px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
  white-space: nowrap;
  line-height: 1;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn:active { transform: translateY(0); }
.cookie-btn-decline {
  background: #f5f7f9;
  color: #33454f;
  border-color: #e2e7eb;
}
.cookie-btn-decline:hover { background: #e6ecf0; border-color: #ccd5db; }
.cookie-btn-accept {
  background: #04445C;
  color: #fff;
  border-color: #04445C;
}
.cookie-btn-accept:hover { background: #065a78; border-color: #065a78; }

/* Cookie Settings re-trigger (injected into footer) */
.obs-cookie-settings-btn {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
    opacity: 0.75;
    transition: opacity .15s ease;
    text-decoration: none;
}
.obs-cookie-settings-btn:hover { opacity: 1; }

@media (max-width: 700px) {
  .cookie-banner { padding: 7px 0; }
  .cookie-banner-inner { flex-wrap: wrap; gap: 8px; }
  .cookie-banner-icon { display: none; }
  .cookie-banner-text p { font-size: 11.5px; line-height: 1.4; }
  .cookie-banner-actions { width: 100%; gap: 8px; }
  .cookie-btn { flex: 1; text-align: center; padding: 7px 10px; font-size: 12px; }
}
