.rklead-container[hidden] { display: none !important; }

/* Wrapper to isolate stacking context */
.rklead-container { position: fixed; inset: 0; z-index: 2147483647; pointer-events: none; }

/* Backdrop */
.rklead-backdrop { position: absolute; inset: 0; background: rgba(10, 12, 15, 0.35); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.rklead-container.is-modal-open .rklead-backdrop { opacity: 1; pointer-events: auto; }

/* Modal Wrapper for centering */
.rklead-modal-wrapper { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; transform: translateY(15px) scale(0.98); pointer-events: none; transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.rklead-container.is-modal-open .rklead-modal-wrapper { opacity: 1; transform: none; pointer-events: auto; }

/* Modal */
.rklead-modal { position: relative; width: 100%; max-width: 470px; padding: 38px; background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25); color: #171717; max-height: calc(100vh - 40px); overflow-y: auto; }
.rklead-modal:before { position: absolute; content: ""; top: 0; left: 34px; right: 34px; height: 3px; background: #0ea5e9; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; }

/* FAB */
.rklead-fab { position: absolute; bottom: 24px; left: 24px; width: 60px; height: 60px; border-radius: 50%; background: #0ea5e9; color: #fff; border: 0; box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35); cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.8) translateY(20px); pointer-events: none; transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s, background 0.2s; }
.rklead-container.is-fab-open .rklead-fab { opacity: 1; transform: scale(1) translateY(0); pointer-events: auto; animation: rklead-bounce 2.5s infinite ease-in-out; }
.rklead-fab:hover { background: #0284c7; box-shadow: 0 12px 28px rgba(14, 165, 233, 0.45); animation: none; transform: translateY(-2px); }
.rklead-fab svg { transition: transform 0.2s; }
.rklead-fab:hover svg { transform: scale(1.1); }

/* Typography & Forms */
.rklead-eyebrow { display: block; margin-bottom: 13px; color: #0284c7; font-size: 11px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
.rklead-modal h2 { margin: 0 28px 13px 0; font-size: 27px; letter-spacing: -0.035em; line-height: 1.16; color: #111827; }
.rklead-description, .rklead-help, .rklead-success p { color: #4b5563; line-height: 1.55; }
.rklead-description { font-size: 15px; }
.rklead-close { position: absolute; right: 17px; top: 15px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f3f4f6; font-size: 24px; line-height: 1; color: #3f4348; cursor: pointer; transition: background 0.2s; }
.rklead-close:hover { background: #e5e7eb; }
.rklead-field { margin: 17px 0; }
.rklead-field label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; color: #374151; }
.rklead-input { box-sizing: border-box; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font-size: 16px; color: #111827; transition: border-color 0.18s, box-shadow 0.18s; }
.rklead-input:focus { outline: 0; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15); }
.rklead-submit { width: 100%; min-height: 52px; border: 0; border-radius: 8px; background: #0ea5e9; color: #fff; font-size: 14px; font-weight: 700; letter-spacing: 0.03em; cursor: pointer; transition: transform 0.18s, background 0.18s, box-shadow 0.18s; }
.rklead-submit:hover { transform: translateY(-1px); background: #0284c7; box-shadow: 0 8px 18px rgba(2, 132, 199, 0.24); }
.rklead-submit:disabled { opacity: 0.65; cursor: wait; }
.rklead-help { margin: 16px 0 0; font-size: 12px; text-align: center; }
.rklead-error { min-height: 20px; margin: 0 0 10px; color: #dc2626; font-size: 13px; }
.rklead-success { text-align: center; }
.rklead-success h2 { margin-right: 0; }

/* Utilities */
.rklead-open { overflow: hidden; }

@keyframes rklead-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Mobile optimization */
@media (max-width: 575px) {
  .rklead-modal-wrapper { padding: 16px; }
  .rklead-modal { width: 100%; max-width: 470px; padding: 28px 20px; max-height: 85vh; border-radius: 14px; }
  .rklead-modal h2 { font-size: 24px; }
  .rklead-fab { bottom: 20px; left: 16px; }
}
