/* ==========================================================================
   Payasti Bengali Spell Checker Stylesheet (Compact & Modern UI)
   Minimalist Grammarly/Google Docs inspired floating card design
   ========================================================================== */

/* 1. Highlight for misspelled words inside editor */
.payasti-spell-error {
  text-decoration: underline wavy #e11d48 2px !important;
  text-underline-offset: 5px !important;
  background-color: rgba(225, 29, 72, 0.07) !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease, text-decoration-color 0.15s ease !important;
  position: relative !important;
  display: inline !important;
}

.payasti-spell-error:hover {
  background-color: rgba(225, 29, 72, 0.16) !important;
  text-decoration-color: #be123c !important;
}

/* 2. Floating Popover Suggestion Card (Compact & Elegant) */
.payasti-spell-popover,
.payasti-spell-popover * {
  font-family: 'payasti_uni', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-feature-settings: "ss01" 1 !important;
  -webkit-font-feature-settings: "ss01" 1 !important;
}

.payasti-spell-popover {
  position: absolute;
  z-index: 99999;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.14), 0 4px 10px -2px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  width: auto;
  min-width: 220px;
  max-width: 300px;
  padding: 10px 12px;
  animation: payastiFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  user-select: none;
}

/* Little Arrow Pointer on top */
.payasti-spell-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  border-top: 1px solid #e2e8f0;
  transform: rotate(45deg);
}

.payasti-spell-popover.popover-above::before {
  top: auto;
  bottom: -6px;
  border-left: none;
  border-top: none;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

@keyframes payastiFadeIn {
  from {
    opacity: 0;
    transform: translateY(3px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.payasti-spell-popover-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.payasti-spell-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.payasti-spell-btn-suggestion {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 12px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
  font-size: 18px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: left;
}

.payasti-spell-btn-suggestion:hover {
  background: #16a34a;
  border-color: #15803d;
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(22, 163, 74, 0.25);
  transform: translateY(-1px);
}

.payasti-spell-btn-suggestion .btn-check-icon {
  font-size: 14px;
  opacity: 0.8;
  margin-left: 6px;
}

.payasti-spell-btn-ignore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  transition: background 0.12s ease, color 0.12s ease;
}

.payasti-spell-btn-ignore:hover {
  background: #f1f5f9;
  color: #475569;
}

.payasti-spell-rule-reason {
  background: #f8fafc;
  border-left: 2.5px solid var(--admin-primary, #6366f1);
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  font-size: 15px;
  color: #475569;
  line-height: 1.45;
  margin-top: 8px;
}

.payasti-spell-popover-actions {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
}

.payasti-spell-btn-add-dict {
  background: none;
  border: none;
  color: var(--admin-primary, #4f46e5);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.payasti-spell-btn-add-dict:hover {
  background: #eef2ff;
  color: #4338ca;
}

/* 3. Spell Checker Control Bar Widget */
.payasti-spell-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  font-size: 12px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.payasti-spell-widget.has-errors {
  border-color: #fecaca;
  background: #fff5f5;
}

.payasti-spell-widget.is-clean {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.payasti-spell-status-text {
  font-weight: 600;
  color: #334155;
}

.payasti-spell-toggle-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s ease;
}

.payasti-spell-toggle-btn.active {
  background: #10b981;
  border-color: #059669;
  color: #ffffff;
}
