/* ===== EverAid Guided Support Widget ===== */
    #support-widget {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 9999;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    }

    #support-widget * {
      box-sizing: border-box;
    }

    #support-widget .support-toggle {
      position: relative;
      display: grid;
      width: 58px;
      height: 58px;
      place-items: center;
      border: 0;
      border-radius: 50%;
      color: #fff;
      background: linear-gradient(145deg, #1f2937, #111827);
      box-shadow: 0 14px 35px rgba(17, 24, 39, 0.28);
      font-size: 25px;
      cursor: pointer;
    }

    #support-widget .support-toggle:hover {
      transform: translateY(-1px);
    }

    #support-widget #support-badge {
      position: absolute;
      top: -5px;
      right: -4px;
      display: none;
      min-width: 22px;
      height: 22px;
      padding: 0 6px;
      place-items: center;
      border: 2px solid #fff;
      border-radius: 999px;
      color: #fff;
      background: #dc2626;
      font-size: 11px;
      font-weight: 800;
    }

    #support-widget .support-box {
      position: absolute !important;
      right: 0 !important;
      bottom: 72px !important;
      display: none !important;
      flex-direction: column !important;
      width: min(410px, calc(100vw - 30px)) !important;
      height: min(680px, calc(100vh - 120px)) !important;
      max-width: none !important;
      max-height: none !important;
      overflow: hidden !important;
      border: 1px solid rgba(17, 24, 39, 0.12) !important;
      border-radius: 20px !important;
      background: #fff !important;
      box-shadow: 0 28px 75px rgba(17, 24, 39, 0.24) !important;
    }

    #support-widget .support-box.open {
      display: flex !important;
    }

    #support-widget .support-box.unread {
      box-shadow:
        0 0 0 3px rgba(220, 38, 38, 0.18),
        0 28px 75px rgba(17, 24, 39, 0.24) !important;
    }

    #support-widget .chat-header {
      display: flex;
      flex: 0 0 auto;
      align-items: center;
      justify-content: space-between;
      min-height: 64px;
      padding: 13px 15px;
      color: #fff;
      background:
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.32), transparent 42%),
        #111827;
    }

    #support-widget .chat-header-main {
      display: flex;
      min-width: 0;
      align-items: center;
      gap: 10px;
    }

    #support-widget .chat-brand-mark {
      display: grid;
      flex: 0 0 38px;
      width: 38px;
      height: 38px;
      place-items: center;
      border-radius: 11px;
      color: #2f2408;
      background: linear-gradient(145deg, #e7c766, #b68b2d);
      font-size: 13px;
      font-weight: 900;
    }

    #support-widget .chat-title {
      overflow: hidden;
      font-size: 14px;
      font-weight: 850;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    #support-widget .chat-status {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 3px;
      color: #d1d5db;
      font-size: 10px;
    }

    #support-widget .chat-status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #22c55e;
      box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    }

    #support-widget .chat-header-actions {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    #support-widget .header-action {
      display: grid;
      width: 34px;
      height: 34px;
      place-items: center;
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 9px;
      color: #fff;
      background: rgba(255, 255, 255, 0.08);
      font-size: 17px;
      cursor: pointer;
    }

    #support-widget .header-action:hover {
      background: rgba(255, 255, 255, 0.14);
    }

    #support-widget .support-body {
      display: flex;
      flex: 1 1 auto;
      min-height: 0;
      flex-direction: column;
      background: #f8fafc;
    }

    #support-widget .support-loading {
      display: grid;
      flex: 1;
      min-height: 0;
      place-items: center;
      padding: 28px;
      color: #6b7280;
      text-align: center;
      font-size: 13px;
    }

    #support-widget .support-loading-spinner {
      width: 30px;
      height: 30px;
      margin: 0 auto 12px;
      border: 3px solid #e5e7eb;
      border-top-color: #b68b2d;
      border-radius: 50%;
      animation: everaidSpin 0.8s linear infinite;
    }

    @keyframes everaidSpin {
      to { transform: rotate(360deg); }
    }

    #support-widget .support-intake {
      display: none;
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      background:
        radial-gradient(circle at top right, rgba(182, 139, 45, 0.08), transparent 34%),
        #f8fafc;
    }

    #support-widget .support-intake.active {
      display: block;
    }

    #support-widget .intake-screen {
      min-height: 100%;
      padding: 20px 18px 24px;
    }

    #support-widget .intake-screen.hidden {
      display: none;
    }

    #support-widget .intake-kicker {
      margin-bottom: 7px;
      color: #9a741f;
      font-size: 10px;
      font-weight: 850;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    #support-widget .intake-screen h3 {
      margin: 0;
      color: #111827;
      font-size: 20px;
      line-height: 1.25;
    }

    #support-widget .intake-copy {
      margin: 9px 0 17px;
      color: #6b7280;
      font-size: 12px;
      line-height: 1.55;
    }

    #support-widget .intake-options {
      display: grid;
      gap: 9px;
    }

    #support-widget .intake-option {
      display: grid;
      grid-template-columns: 39px minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      width: 100%;
      min-height: 60px;
      padding: 10px 11px;
      border: 1px solid #e5e7eb;
      border-radius: 13px;
      color: #111827;
      background: #fff;
      text-align: left;
      cursor: pointer;
      transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
    }

    #support-widget .intake-option:hover {
      transform: translateY(-1px);
      border-color: rgba(182, 139, 45, 0.6);
      box-shadow: 0 8px 20px rgba(17, 24, 39, 0.07);
    }

    #support-widget .intake-option-icon {
      display: grid;
      width: 39px;
      height: 39px;
      place-items: center;
      border-radius: 11px;
      background: #fff8e8;
      font-size: 20px;
    }

    #support-widget .intake-option strong {
      display: block;
      margin-bottom: 3px;
      font-size: 12px;
    }

    #support-widget .intake-option small {
      display: block;
      color: #6b7280;
      font-size: 10px;
      line-height: 1.35;
    }

    #support-widget .intake-option-arrow {
      color: #9ca3af;
      font-size: 17px;
    }

    #support-widget .agent-direct {
      margin-top: 13px;
      border-color: #bfdbfe;
      background: #eff6ff;
    }

    #support-widget .agent-direct .intake-option-icon {
      background: #dbeafe;
    }

    #support-widget .intake-privacy {
      margin: 15px 2px 0;
      color: #9ca3af;
      font-size: 9px;
      line-height: 1.45;
      text-align: center;
    }

    #support-widget .intake-back {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      margin-bottom: 13px;
      padding: 0;
      border: 0;
      color: #4b5563;
      background: transparent;
      font-size: 11px;
      font-weight: 800;
      cursor: pointer;
    }

    #support-widget .intake-form-grid {
      display: grid;
      gap: 11px;
      margin-top: 16px;
    }

    #support-widget .intake-field label {
      display: block;
      margin-bottom: 5px;
      color: #374151;
      font-size: 10px;
      font-weight: 800;
    }

    #support-widget .intake-field label .optional {
      color: #9ca3af;
      font-weight: 600;
    }

    #support-widget .intake-input,
    #support-widget .intake-select,
    #support-widget .intake-textarea {
      width: 100%;
      min-height: 42px;
      padding: 9px 10px;
      border: 1px solid #d1d5db;
      border-radius: 10px;
      outline: none;
      color: #111827;
      background: #fff;
      font: inherit;
      font-size: 12px;
    }

    #support-widget .intake-textarea {
      min-height: 88px;
      resize: vertical;
      line-height: 1.45;
    }

    #support-widget .intake-input:focus,
    #support-widget .intake-select:focus,
    #support-widget .intake-textarea:focus {
      border-color: #b68b2d;
      box-shadow: 0 0 0 3px rgba(182, 139, 45, 0.12);
    }

    #support-widget .intake-error {
      display: none;
      margin-top: 12px;
      padding: 9px 10px;
      border: 1px solid #fecaca;
      border-radius: 9px;
      color: #991b1b;
      background: #fef2f2;
      font-size: 10px;
      line-height: 1.4;
    }

    #support-widget .intake-error.show {
      display: block;
    }

    #support-widget .intake-primary,
    #support-widget .intake-secondary {
      width: 100%;
      min-height: 43px;
      margin-top: 13px;
      border-radius: 10px;
      font-size: 11px;
      font-weight: 850;
      cursor: pointer;
    }

    #support-widget .intake-primary {
      border: 0;
      color: #fff;
      background: #111827;
    }

    #support-widget .intake-primary:hover {
      background: #253044;
    }

    #support-widget .intake-primary:disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }

    #support-widget .intake-secondary {
      border: 1px solid #d1d5db;
      color: #374151;
      background: #fff;
    }

    #support-widget .review-card {
      margin-top: 16px;
      overflow: hidden;
      border: 1px solid #e5e7eb;
      border-radius: 13px;
      background: #fff;
    }

    #support-widget .review-title {
      padding: 11px 12px;
      color: #4b3410;
      background: #fff8e8;
      font-size: 11px;
      font-weight: 850;
    }

    #support-widget .review-list {
      margin: 0;
      padding: 4px 12px 10px;
    }

    #support-widget .review-row {
      display: grid;
      grid-template-columns: 105px minmax(0, 1fr);
      gap: 10px;
      padding: 8px 0;
      border-bottom: 1px solid #f3f4f6;
      font-size: 10px;
    }

    #support-widget .review-row:last-child {
      border-bottom: 0;
    }

    #support-widget .review-label {
      color: #9ca3af;
      font-weight: 800;
    }

    #support-widget .review-value {
      color: #374151;
      overflow-wrap: anywhere;
      white-space: pre-wrap;
    }

    #support-widget .intake-success {
      margin: 12px 14px 0;
      padding: 10px 12px;
      border: 1px solid #bbf7d0;
      border-radius: 11px;
      color: #166534;
      background: #f0fdf4;
      font-size: 10px;
      line-height: 1.45;
    }

    #support-widget .chat-messages {
      display: none;
      flex: 1 1 auto;
      min-height: 0;
      padding: 15px 13px;
      overflow-y: auto;
      background:
        linear-gradient(rgba(248, 250, 252, 0.95), rgba(248, 250, 252, 0.95)),
        radial-gradient(circle at 30% 15%, rgba(182, 139, 45, 0.11), transparent 34%);
    }

    #support-widget .chat-messages.active {
      display: block;
    }

    #support-widget .msg {
      width: fit-content;
      max-width: 84%;
      margin: 8px 0;
      padding: 9px 11px;
      border: 1px solid #e5e7eb;
      border-radius: 14px 14px 14px 4px;
      color: #111827;
      background: #fff;
      box-shadow: 0 3px 10px rgba(17, 24, 39, 0.04);
      font-size: 11px;
      line-height: 1.48;
      overflow-wrap: anywhere;
      white-space: pre-wrap;
    }

    #support-widget .msg.user {
      margin-left: auto;
      border-color: #111827;
      border-radius: 14px 14px 4px 14px;
      color: #fff;
      background: #111827;
    }

    #support-widget .seen-indicator {
      margin-top: 4px;
      color: #d1d5db;
      font-size: 8px;
      text-align: right;
    }

    #support-widget .chat-input {
      display: none;
      flex: 0 0 auto;
      gap: 8px;
      padding: 10px;
      border-top: 1px solid #e5e7eb;
      background: #fff;
    }

    #support-widget .chat-input.active {
      display: flex;
    }

    #support-widget .chat-input input {
      flex: 1 1 auto;
      min-width: 0;
      min-height: 42px;
      padding: 9px 10px;
      border: 1px solid #d1d5db;
      border-radius: 10px;
      outline: none;
      font-size: 11px;
    }

    #support-widget .chat-input input:focus {
      border-color: #b68b2d;
      box-shadow: 0 0 0 3px rgba(182, 139, 45, 0.11);
    }

    #support-widget .chat-send {
      flex: 0 0 auto;
      min-width: 66px;
      border: 0;
      border-radius: 10px;
      color: #fff;
      background: #111827;
      font-size: 10px;
      font-weight: 850;
      cursor: pointer;
    }

    #support-widget .chat-send:disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }

    @media (max-width: 560px) {
      #support-widget {
        right: 12px;
        bottom: 12px;
      }

      #support-widget .support-box {
        position: fixed !important;
        inset: 10px !important;
        width: auto !important;
        height: auto !important;
        border-radius: 16px !important;
      }

      #support-widget .support-toggle {
        width: 54px;
        height: 54px;
      }
    }
