/* Modal Sugestão / Fale conosco (mesmo fluxo do Dicionário Informal) */
.fmodal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}

.fmodal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.fmodal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.22s;
}

.fmodal-overlay.open .fmodal {
  transform: translateY(0) scale(1);
}

.fmodal-header {
  padding: 1.1rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid rgba(26, 29, 38, 0.12);
}

.fmodal-tabs {
  display: flex;
  gap: 0;
}

.fmodal-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  margin-bottom: -1.5px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.fmodal-tab-icon {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

.fmodal-tab-icon svg {
  display: block;
}

.fmodal-tab.active {
  color: #4f6ad8;
  border-bottom-color: #4f6ad8;
}

.fmodal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.15rem 0.25rem;
  transition: color 0.15s;
  font-family: inherit;
}

.fmodal-close:hover {
  color: #1a1d26;
}

.fmodal-body {
  padding: 1.5rem;
}

.fform-group {
  margin-bottom: 1rem;
}

.fform-hint {
  font-size: 0.8rem;
  color: #6b7280;
  margin: 0 0 0.85rem;
  line-height: 1.35;
}

.fform-hint strong {
  color: #374151;
  font-weight: 700;
}

.fform-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.4rem;
}

.fform-input,
.fform-textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid rgba(26, 29, 38, 0.14);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #1a1d26;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
  background: #fff;
}

.fform-input:focus,
.fform-textarea:focus {
  border-color: #4f6ad8;
}

.fform-textarea {
  resize: vertical;
  min-height: 88px;
}

.fform-submit {
  width: 100%;
  padding: 0.78rem;
  background: #4f6ad8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 0.25rem;
  font-family: inherit;
}

.fform-submit:hover {
  opacity: 0.88;
}

.fform-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fmodal-msg {
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.83rem;
  margin-bottom: 1rem;
}

.fmodal-msg.success {
  background: #edf9f0;
  border: 1.5px solid #a3e4b7;
  color: #1a7a3f;
}

.fmodal-msg.error {
  background: #fff0f0;
  border: 1.5px solid #ffc5c5;
  color: #b00;
}

.fmodal-success-view {
  text-align: center;
  padding: 2rem 1.5rem;
}

.fmodal-success-icon {
  margin-bottom: 0.75rem;
  line-height: 0;
  color: #1a7a3f;
}

.fmodal-success-icon svg {
  display: block;
  margin: 0 auto;
}

.fmodal-success-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: #1a1d26;
  margin-bottom: 0.4rem;
}

.fmodal-success-desc {
  font-size: 0.85rem;
  color: #6b7280;
}

@media (max-width: 540px) {
  .fmodal {
    border-radius: 10px;
  }

  .fmodal-body {
    padding: 1rem;
  }
}

/* Tema escuro (variáveis globais em styles.css) */
[data-theme="dark"] .fmodal {
  background: var(--bg1, #141824);
  color: var(--text, #e9ecf4);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .fmodal-header {
  border-bottom-color: var(--line, rgba(255, 255, 255, 0.08));
}

[data-theme="dark"] .fmodal-tab {
  color: var(--muted, #8b95a8);
}

[data-theme="dark"] .fmodal-tab.active {
  color: var(--accent, #8b9cff);
  border-bottom-color: var(--accent, #8b9cff);
}

[data-theme="dark"] .fmodal-close {
  color: var(--muted, #8b95a8);
}

[data-theme="dark"] .fmodal-close:hover {
  color: var(--text, #e9ecf4);
}

[data-theme="dark"] .fform-hint {
  color: var(--muted, #8b95a8);
}

[data-theme="dark"] .fform-hint strong {
  color: var(--text, #e9ecf4);
}

[data-theme="dark"] .fform-label {
  color: var(--text, #e9ecf4);
}

[data-theme="dark"] .fform-input,
[data-theme="dark"] .fform-textarea {
  border-color: var(--line, rgba(255, 255, 255, 0.12));
  background: var(--bg2, #1c2230);
  color: var(--text, #e9ecf4);
}

[data-theme="dark"] .fform-input:focus,
[data-theme="dark"] .fform-textarea:focus {
  border-color: var(--accent, #8b9cff);
}

[data-theme="dark"] .fmodal-success-title {
  color: var(--text, #e9ecf4);
}

[data-theme="dark"] .fmodal-success-desc {
  color: var(--muted, #8b95a8);
}

[data-theme="dark"] .fmodal-success-icon {
  color: #4ade80;
}
