/* ==========================================================================
   FlashSite CRM — Capture Widget & Inline Form
   ========================================================================== */

:root {
  --fcrm-accent: #ff8a5c;
  --fcrm-bg:     #ffffff;
  --fcrm-text:   #1a1a1a;
  --fcrm-muted:  #6b7280;
  --fcrm-border: #e5e7eb;
  --fcrm-r:      12px;
  --fcrm-r-sm:   8px;
  --fcrm-shadow: 0 8px 40px rgba(0,0,0,0.18);
}

/* --------------------------------------------------------------------------
   Widget container
   -------------------------------------------------------------------------- */
.fcrm-widget {
  position: fixed;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fcrm-widget-bottom-right {
  bottom: 24px;
  right: 24px;
}

.fcrm-widget-bottom-left {
  bottom: 24px;
  left: 24px;
}

/* --------------------------------------------------------------------------
   Floating button
   -------------------------------------------------------------------------- */
.fcrm-widget-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--fcrm-accent);
  color: #fff;
  border: none;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,138,92,0.45);
  transition: transform .18s, box-shadow .18s;
  white-space: nowrap;
}

.fcrm-widget-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255,138,92,0.55);
}

.fcrm-widget-btn-icon {
  font-size: 16px;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Popup panel
   -------------------------------------------------------------------------- */
.fcrm-widget-panel {
  position: absolute;
  bottom: 70px;
  width: 320px;
  background: var(--fcrm-bg);
  border-radius: var(--fcrm-r);
  box-shadow: var(--fcrm-shadow);
  border: 1px solid var(--fcrm-border);
  overflow: hidden;
  display: none;
  animation: fcrm-panel-in .2s ease;
}

.fcrm-widget-bottom-right .fcrm-widget-panel {
  right: 0;
}

.fcrm-widget-bottom-left .fcrm-widget-panel {
  left: 0;
}

.fcrm-widget-panel.open {
  display: block;
}

@keyframes fcrm-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --------------------------------------------------------------------------
   Panel header
   -------------------------------------------------------------------------- */
.fcrm-wp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--fcrm-accent);
  color: #fff;
}

.fcrm-wp-title {
  font-size: 14px;
  font-weight: 700;
}

.fcrm-wp-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.fcrm-wp-close:hover {
  background: rgba(255,255,255,0.35);
}

.fcrm-wp-body {
  padding: 18px;
}

/* --------------------------------------------------------------------------
   Capture Form (shared by widget panel and inline shortcode)
   -------------------------------------------------------------------------- */
.fcrm-cf-field {
  margin-bottom: 12px;
}

.fcrm-cf-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--fcrm-muted);
  margin-bottom: 5px;
}

.fcrm-cf-field label span {
  color: var(--fcrm-accent);
}

.fcrm-cf-field input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--fcrm-border);
  border-radius: var(--fcrm-r-sm);
  font-size: 13px;
  color: var(--fcrm-text);
  background: #f9fafb;
  box-sizing: border-box;
  transition: border-color .15s;
  font-family: inherit;
}

.fcrm-cf-field input:focus {
  outline: none;
  border-color: var(--fcrm-accent);
  background: #fff;
}

.fcrm-cf-error {
  font-size: 12px;
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--fcrm-r-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
}

.fcrm-cf-submit {
  width: 100%;
  padding: 11px;
  background: var(--fcrm-accent);
  color: #fff;
  border: none;
  border-radius: var(--fcrm-r-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  font-family: inherit;
}

.fcrm-cf-submit:hover {
  opacity: .9;
}

.fcrm-cf-submit:active {
  transform: scale(.98);
}

.fcrm-cf-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.fcrm-cf-success {
  text-align: center;
  padding: 20px 10px;
  color: #15803d;
  font-size: 14px;
  font-weight: 600;
}

.fcrm-cf-success::before {
  content: "✓";
  display: block;
  font-size: 32px;
  color: var(--fcrm-accent);
  margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   Inline form (shortcode)
   -------------------------------------------------------------------------- */
.fcrm-inline-form {
  background: #fff;
  border: 1px solid var(--fcrm-border);
  border-radius: var(--fcrm-r);
  padding: 28px;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.fcrm-inline-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--fcrm-text);
  margin: 0 0 20px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 400px) {
  .fcrm-widget-panel {
    width: 290px;
  }

  .fcrm-widget-btn-text {
    display: none;
  }

  .fcrm-widget-btn {
    padding: 14px;
    border-radius: 50%;
  }
}
