#og-lead-widget {
  --ogw-blue: #1a73e8;
  --ogw-blue-dark: #1557b0;
  --ogw-red: #ea4335;
  --ogw-yellow: #fbbc04;
  --ogw-green: #34a853;
  --ogw-text: #202124;
  --ogw-muted: #5f6368;
  --ogw-line: #dadce0;
  --ogw-bg: #f8f9fa;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#og-lead-widget * { box-sizing: border-box; }

#og-lead-widget .ogw-rail {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100050;
  filter: drop-shadow(0 12px 28px rgba(26, 115, 232, 0.28));
}

#og-lead-widget .ogw-rail-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

#og-lead-widget .ogw-rail-card {
  position: relative;
  z-index: 2;
  width: 68px;
  color: #fff;
  border-radius: 14px 0 0 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: width 0.28s ease;
  background: linear-gradient(
    145deg,
    var(--ogw-blue) 0%,
    var(--ogw-green) 28%,
    var(--ogw-yellow) 52%,
    var(--ogw-red) 72%,
    var(--ogw-blue) 100%
  );
  background-size: 240% 240%;
  animation: ogw-rail-shimmer 9s ease-in-out infinite;
}

#og-lead-widget:not(.is-collapsed) .ogw-rail-card { width: 220px; }

#og-lead-widget .ogw-rail-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 22px 0;
  min-height: 72px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 600 13px/1.25 'Inter', sans-serif;
  text-align: left;
}

#og-lead-widget:not(.is-collapsed) .ogw-rail-item {
  justify-content: flex-start;
  padding: 14px 12px;
}

#og-lead-widget .ogw-rail-item + .ogw-rail-item {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

#og-lead-widget .ogw-rail-item:hover { background: rgba(255, 255, 255, 0.12); }

#og-lead-widget .ogw-rail-item svg {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  animation: ogw-icon-pulse 2.8s ease-in-out infinite;
}

#og-lead-widget .ogw-rail-item:nth-child(2) svg { animation-delay: 1.4s; }
#og-lead-widget .ogw-rail-item:hover svg { animation-play-state: paused; }

@keyframes ogw-icon-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.88; }
}

@keyframes ogw-rail-shimmer {
  0%, 100% { background-position: 0% 35%; }
  50% { background-position: 100% 65%; }
}

#og-lead-widget .ogw-rail-item span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

#og-lead-widget:not(.is-collapsed) .ogw-rail-item span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

#og-lead-widget .ogw-handle {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 20px;
  height: 40px;
  border: 0;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  background: #e8eaed;
  color: #5f6368;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -2px 2px 8px rgba(32, 33, 36, 0.14);
}

#og-lead-widget .ogw-handle:hover { background: #dde1e6; }
#og-lead-widget .ogw-handle svg { width: 12px; height: 12px; display: block; }
#og-lead-widget .ogw-handle-expand { display: none; }
#og-lead-widget.is-collapsed .ogw-handle-expand { display: block; }
#og-lead-widget.is-collapsed .ogw-handle-collapse { display: none; }

#og-lead-widget .ogw-overlay {
  position: fixed;
  inset: 0;
  z-index: 100060;
  background: rgba(32, 33, 36, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#og-lead-widget.is-open .ogw-overlay { display: flex; }

#og-lead-widget .ogw-modal {
  width: min(920px, 100%);
  max-height: min(90vh, 720px);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 240px 1fr;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  position: relative;
}

#og-lead-widget .ogw-side {
  background: var(--ogw-bg);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#og-lead-widget .ogw-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ogw-text);
  padding: 14px 12px;
  cursor: pointer;
  text-align: left;
  font: 600 14px/1.3 'Inter', sans-serif;
  position: relative;
}

#og-lead-widget .ogw-tab svg { width: 22px; height: 22px; flex: 0 0 auto; opacity: 0.85; }
#og-lead-widget .ogw-tab.is-active { background: var(--ogw-blue); color: #fff; }

#og-lead-widget .ogw-tab.is-active::after {
  content: '';
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  border: 10px solid transparent;
  border-left-color: var(--ogw-blue);
}

#og-lead-widget .ogw-main {
  padding: 28px 28px 24px;
  overflow: auto;
  position: relative;
}

#og-lead-widget .ogw-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f1f3f4;
  color: #5f6368;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

#og-lead-widget .ogw-close:hover { color: var(--ogw-text); background: #e8eaed; }

#og-lead-widget .ogw-panel { display: none; }
#og-lead-widget .ogw-panel.is-active { display: block; }

#og-lead-widget .ogw-title {
  margin: 8px 40px 10px 0;
  text-align: center;
  font: 700 20px/1.25 'Inter', sans-serif;
  color: var(--ogw-text);
}

#og-lead-widget .ogw-sub {
  margin: 0 auto 22px;
  max-width: 520px;
  text-align: center;
  color: var(--ogw-muted);
  font: 400 15px/1.45 'Inter', sans-serif;
}

#og-lead-widget .ogw-form {
  display: grid;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}

#og-lead-widget .ogw-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--ogw-line);
  border-radius: 12px;
  background: #fff;
}

#og-lead-widget .ogw-field.is-invalid { border-color: #d93025; }

#og-lead-widget .ogw-field svg {
  width: 18px;
  height: 18px;
  color: #9aa0a6;
  flex: 0 0 auto;
}

#og-lead-widget .ogw-field input,
#og-lead-widget .ogw-area textarea {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font: 400 15px/1.4 'Inter', sans-serif;
  color: var(--ogw-text);
}

#og-lead-widget .ogw-area {
  align-items: flex-start;
  padding-top: 12px;
  padding-bottom: 12px;
  min-height: 96px;
}

#og-lead-widget .ogw-area textarea { resize: vertical; min-height: 72px; }

#og-lead-widget .ogw-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font: 400 12px/1.4 'Inter', sans-serif;
  color: var(--ogw-muted);
}

#og-lead-widget .ogw-check input { margin-top: 2px; flex: 0 0 auto; accent-color: var(--ogw-blue); }
#og-lead-widget .ogw-check a { color: var(--ogw-blue); text-decoration: underline; }

#og-lead-widget .ogw-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--ogw-blue);
  color: #fff;
  cursor: pointer;
  font: 700 15px/1 'Inter', sans-serif;
  box-shadow: 0 10px 24px rgba(26, 115, 232, 0.28);
}

#og-lead-widget .ogw-submit:hover { background: var(--ogw-blue-dark); }
#og-lead-widget .ogw-submit:disabled { opacity: 0.65; cursor: wait; }

#og-lead-widget .ogw-error {
  color: #d93025;
  font: 500 13px/1.4 'Inter', sans-serif;
  min-height: 1.2em;
  text-align: center;
}

#og-lead-widget .ogw-success {
  display: none;
  text-align: center;
  padding: 48px 24px;
  color: var(--ogw-text);
}

#og-lead-widget .ogw-success-title {
  margin: 0 0 10px;
  font: 700 24px/1.3 'Inter', sans-serif;
}

#og-lead-widget .ogw-success-text {
  margin: 0;
  font: 400 16px/1.45 'Inter', sans-serif;
  color: var(--ogw-muted);
}

#og-lead-widget.is-success .ogw-form,
#og-lead-widget.is-success .ogw-title,
#og-lead-widget.is-success .ogw-sub,
#og-lead-widget.is-success .ogw-side,
#og-lead-widget.is-success .ogw-check,
#og-lead-widget.is-success .ogw-error,
#og-lead-widget.is-success .ogw-submit { display: none !important; }

#og-lead-widget.is-success .ogw-success { display: block; }
#og-lead-widget.is-success .ogw-modal { grid-template-columns: 1fr; }
#og-lead-widget.is-success .ogw-panel { display: none; }

#og-lead-widget.is-success .ogw-main {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 760px) {
  #og-lead-widget:not(.is-collapsed) .ogw-rail-card { width: 190px; }
  #og-lead-widget .ogw-modal {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }
  #og-lead-widget .ogw-side {
    flex-direction: row;
    overflow: auto;
    padding: 10px;
  }
  #og-lead-widget .ogw-tab { min-width: 70%; flex: 1 0 auto; }
  #og-lead-widget .ogw-tab.is-active::after { display: none; }
  #og-lead-widget .ogw-main { padding: 20px 16px 16px; }
  #og-lead-widget .ogw-title { font-size: 16px; margin-right: 36px; }
}

@media (max-width: 480px) {
  #og-lead-widget .ogw-rail {
    top: auto;
    bottom: 12px;
    transform: none;
    right: 0;
  }
}
