/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 .post-snippet h5:hover {
   text-decoration: underline;
 }

 .badge {
   font-size: 0.85rem;
 }

/* Reactions Styles */
.reactions-container {
  margin-top: 1rem;
  padding-top: 0rem;
  border-top: 0px solid #e9ecef;
}

.reactions-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  /*border: 1px solid #dee2e6;*/
  background: var(--async-reaction-bg, white);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.reaction-btn:hover {
  background: var(--async-reaction-hover, #f8f9fa);
  border-color: #adb5bd;
}

.reaction-btn.active {
  background: var(--async-reaction-active, #e3f2fd);
  border-color: transparent;
  /*color: #1976d2;*/
}

.reaction-btn .count {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Remove focus outline from user dropdown link */
.nav-link.dropdown-toggle:focus {
  outline: none;
  box-shadow: none;
}

/* Walls dropdown styling */
.dropdown-menu .dropdown-item.active {
  background-color: #0d6efd;
  color: white;
}

.dropdown-menu .dropdown-item:hover {
  background-color: #f8f9fa;
}

.dropdown-menu .dropdown-item.active:hover {
  background-color: #0b5ed7;
}

.dropdown-header {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.8px;
  padding-top: 0.75rem;
  padding-bottom: 0.5rem;
  color: #6c757d !important;
  margin-bottom: 0.25rem;
}

.dropdown-item small {
  display: block;
  line-height: 1.2;
}

/* Quick filter styling */
#quick-filter-container {
  margin-left: 0.5rem;
}

#quick-filter-form .select2-container {
  font-size: 0.875rem;
}

#quick-filter-form .select2-selection {
  border-color: #dee2e6;
  min-height: 38px;
}

#quick-filter-form .select2-selection__choice {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: white;
}

#quick-filter-form .select2-selection__choice__remove {
  color: white;
  margin-right: 5px;
}

#quick-filter-form .select2-selection__choice__remove:hover {
  color: #ffcccc;
}

/* Botão de limpar filtros */
#quick-filter-form .btn-link {
  white-space: nowrap;
}

#quick-filter-form .btn-link:hover {
  color: #dc3545 !important;
}

/* Organizational chart */
.organizational-chart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.org-node-wrapper {
  position: relative;
}

.org-node {
  border-left: 4px solid #0d6efd;
}

.org-children {
  border-left: 1px dashed #adb5bd;
  padding-left: 1rem;
  margin-left: 0.5rem;
}

/* Meeting records */
.meeting-form-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.meeting-form-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
}

.meeting-participants {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.meeting-person-card {
  flex: 1 1 280px;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 0.9rem;
  background: #f8f9fa;
}

.meeting-person-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  color: #6c757d;
  font-size: 1.2rem;
}

.meeting-record-item {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.meeting-record-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.meeting-discussion-content {
  white-space: pre-wrap;
  word-break: break-word;
}

/* MBTI */
.mbti-shell {
  max-width: 980px;
  margin: 2rem auto 3rem;
  padding: 0 1rem;
}

.mbti-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(14, 35, 61, 0.08);
  padding: 1.5rem;
}

.mbti-hero-card {
  background: linear-gradient(145deg, #eef5ff 0%, #f7fbff 65%, #ffffff 100%);
}

.mbti-overline {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #5f6f85;
  font-size: 0.75rem;
}

.mbti-title {
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
  line-height: 1.2;
  font-weight: 800;
  color: #1a2a44;
}

.mbti-subtitle {
  font-size: 1.05rem;
  color: #4d5d75;
}

.mbti-last-result {
  border-top: 1px solid #e8edf4;
  padding-top: 1rem;
}

.mbti-question-index {
  font-size: 0.95rem;
  font-weight: 700;
  color: #5f6f85;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mbti-question-text {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  line-height: 1.35;
  color: #16233a;
  font-weight: 800;
}

.mbti-progress {
  height: 1.1rem;
  border-radius: 999px;
  background: #ecf1f8;
}

.mbti-progress .progress-bar {
  border-radius: 999px;
  font-weight: 700;
}

.mbti-scale {
  display: grid;
  gap: 0.75rem;
}

.mbti-scale-option {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #dfe6f1;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.mbti-scale-option:hover {
  border-color: #b8c9e5;
  background: #f8fbff;
}

.mbti-scale-option .form-check-input {
  margin-top: 0;
}

.mbti-scale-value {
  display: inline-flex;
  width: 1.9rem;
  height: 1.9rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #edf3ff;
  font-weight: 700;
  color: #2559ad;
}

.mbti-scale-label {
  font-weight: 600;
  color: #25354d;
}

.mbti-result-hero {
  background: radial-gradient(circle at top right, #d8e8ff, #f6fbff 60%);
}

.mbti-type-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mbti-type-code {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: #0f4cb0;
  letter-spacing: 0.04em;
}

.mbti-type-name {
  font-size: 1rem;
  font-weight: 700;
  color: #3f5374;
}

.mbti-axis .progress {
  height: 0.95rem;
  border-radius: 999px;
  background: #ecf1f8;
}

.mbti-axis .progress-bar {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.mbti-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
}

/* =============================================================================
   Theme tokens + dark mode
   ============================================================================= */

:root,
[data-bs-theme="light"] {
  --async-surface: #ffffff;
  --async-surface-raised: #ffffff;
  --async-surface-muted: #f4f6f8;
  --async-border: rgba(15, 23, 42, 0.08);
  --async-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --async-glow: transparent;
  --async-navbar-bg: rgba(255, 255, 255, 0.82);
  --async-body-gradient: linear-gradient(180deg, #f7f8fa 0%, #eef1f5 100%);
  --async-post-prose: #1f2937;
  --async-post-muted: #64748b;
  --async-code-bg: #f1f5f9;
  --async-quote-border: #cbd5e1;
  --async-reaction-bg: #ffffff;
  --async-reaction-hover: #f8fafc;
  --async-reaction-active: #e0f2fe;
  --async-toggle-track: #e2e8f0;
  --async-toggle-thumb: #ffffff;
  --async-toggle-icon: #0f172a;
}

[data-bs-theme="dark"] {
  color-scheme: dark;

  /* Refined slate (cooler than Bootstrap default, less flat) */
  --bs-body-bg: #0c1017;
  --bs-body-color: #e7ecf3;
  --bs-secondary-bg: #151b26;
  --bs-tertiary-bg: #1a2230;
  --bs-border-color: rgba(148, 163, 184, 0.18);
  --bs-border-color-translucent: rgba(148, 163, 184, 0.12);
  --bs-primary: #6ea8fe;
  --bs-primary-rgb: 110, 168, 254;
  --bs-link-color: #8bbcff;
  --bs-link-hover-color: #b3d4ff;
  --bs-emphasis-color: #f8fafc;
  --bs-secondary-color: rgba(231, 236, 243, 0.72);
  --bs-tertiary-color: rgba(231, 236, 243, 0.5);
  --bs-heading-color: #f1f5f9;
  --bs-card-bg: #141a24;
  --bs-card-cap-bg: #171e2a;
  --bs-card-border-color: rgba(148, 163, 184, 0.16);
  --bs-dropdown-bg: #171e2b;
  --bs-dropdown-link-color: #e7ecf3;
  --bs-dropdown-link-hover-bg: rgba(110, 168, 254, 0.12);
  --bs-dropdown-link-active-bg: #3d7eef;
  --bs-modal-bg: #151b26;
  --bs-form-control-bg: #101622;

  --async-surface: #141a24;
  --async-surface-raised: #1a2230;
  --async-surface-muted: #101622;
  --async-border: rgba(148, 163, 184, 0.16);
  --async-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --async-glow: 0 0 0 1px rgba(110, 168, 254, 0.08), 0 24px 60px rgba(0, 0, 0, 0.35);
  --async-navbar-bg: rgba(12, 16, 23, 0.78);
  --async-body-gradient:
    radial-gradient(1200px 500px at 12% -10%, rgba(61, 126, 239, 0.16), transparent 55%),
    radial-gradient(900px 420px at 88% 0%, rgba(56, 189, 248, 0.08), transparent 50%),
    linear-gradient(180deg, #0c1017 0%, #0a0e14 100%);
  --async-post-prose: #dce3ee;
  --async-post-muted: #94a3b8;
  --async-code-bg: #0b1220;
  --async-quote-border: #475569;
  --async-reaction-bg: rgba(255, 255, 255, 0.04);
  --async-reaction-hover: rgba(255, 255, 255, 0.08);
  --async-reaction-active: rgba(110, 168, 254, 0.2);
  --async-toggle-track: #243044;
  --async-toggle-thumb: #0f172a;
  --async-toggle-icon: #f8fafc;
}

html.theme-transitioning,
html.theme-transitioning * {
  transition:
    background-color 0.28s ease,
    color 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    fill 0.28s ease !important;
}

.async-body {
  min-height: 100vh;
  background: var(--async-body-gradient);
  background-attachment: fixed;
}

.async-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: var(--async-navbar-bg) !important;
  border-bottom-color: var(--async-border) !important;
}

.async-brand {
  letter-spacing: -0.02em;
}

/* Theme toggle */
.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  border-radius: 999px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.72;
}

.theme-toggle:hover {
  opacity: 1;
  color: var(--bs-body-color);
  background: transparent;
  transform: none;
}

.theme-toggle:focus-visible {
  outline: 2px solid rgba(110, 168, 254, 0.65);
  outline-offset: 2px;
}

.theme-toggle__icon {
  width: 1.1rem;
  height: 1.1rem;
  position: absolute;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle__icon--sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.theme-toggle__icon--moon {
  opacity: 0;
  transform: scale(0.6) rotate(-40deg);
}

.theme-toggle.is-dark .theme-toggle__icon--sun {
  opacity: 0;
  transform: scale(0.6) rotate(40deg);
}

.theme-toggle.is-dark .theme-toggle__icon--moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Flash */
#flash .notice,
#flash .alert {
  max-width: 720px;
  margin: 0 auto 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--async-border);
}

#flash .notice {
  background: rgba(25, 135, 84, 0.12);
  color: #198754;
}

#flash .alert {
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
}

[data-bs-theme="dark"] #flash .notice {
  background: rgba(25, 135, 84, 0.18);
  color: #75b798;
}

[data-bs-theme="dark"] #flash .alert {
  background: rgba(220, 53, 69, 0.18);
  color: #ea868f;
}

/* Feed / cards */
.post-snippet-title:hover {
  color: var(--bs-link-color) !important;
}

[data-bs-theme="dark"] .card {
  background-color: var(--async-surface);
  border-color: var(--async-border);
  box-shadow: var(--async-glow);
}

[data-bs-theme="dark"] .post-show-card {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(110, 168, 254, 0.08),
    0 28px 70px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .post-show-card .card-body:first-child {
  background:
    linear-gradient(180deg, rgba(110, 168, 254, 0.05), transparent 120px),
    var(--async-surface);
}

[data-bs-theme="dark"] .list-group-item {
  background-color: var(--async-surface);
  border-color: var(--async-border);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-top {
  border-color: var(--async-border) !important;
}

/* Post reading surface — content authored by users */
.post-body,
.trix-content {
  color: var(--async-post-prose);
  font-size: 1.05rem;
  line-height: 1.7;
}

.post-body a,
.trix-content a {
  color: var(--bs-link-color);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.post-body a:hover,
.trix-content a:hover {
  color: var(--bs-link-hover-color);
}

[data-bs-theme="dark"] .post-body .trix-content,
[data-bs-theme="dark"] .trix-content {
  color: var(--async-post-prose);
}

[data-bs-theme="dark"] .trix-content pre {
  background-color: var(--async-code-bg);
  border: 1px solid var(--async-border);
  border-radius: 0.5rem;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .trix-content blockquote {
  border-left-color: var(--async-quote-border);
  color: var(--async-post-muted);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0.4rem 0.4rem 0;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

[data-bs-theme="dark"] .trix-content .attachment--file {
  color: var(--bs-body-color);
  background: var(--async-surface-muted);
  border-color: var(--async-border);
}

[data-bs-theme="dark"] .trix-content .attachment--preview .attachment__caption {
  color: var(--async-post-muted);
}

[data-bs-theme="dark"] .trix-content h1 {
  color: var(--bs-heading-color);
}

/* Trix editor (compose) */
[data-bs-theme="dark"] trix-editor {
  background: var(--async-surface-muted);
  color: var(--async-post-prose);
  border-color: var(--async-border);
}

[data-bs-theme="dark"] trix-toolbar .trix-button-group {
  border-color: #3a4558;
  border-top-color: #4a5568;
  border-bottom-color: #2a3344;
  background: var(--async-surface-raised);
}

[data-bs-theme="dark"] trix-toolbar .trix-button {
  color: rgba(231, 236, 243, 0.75);
  border-bottom-color: #2f3a4d;
}

[data-bs-theme="dark"] trix-toolbar .trix-button:not(:first-child) {
  border-left-color: #3a4558;
}

[data-bs-theme="dark"] trix-toolbar .trix-button.trix-active {
  background: rgba(110, 168, 254, 0.22);
  color: #f8fafc;
}

[data-bs-theme="dark"] trix-toolbar .trix-button--icon::before {
  filter: invert(1) brightness(1.15);
  opacity: 0.85;
}

[data-bs-theme="dark"] trix-toolbar .trix-button--icon.trix-active::before {
  opacity: 1;
}

[data-bs-theme="dark"] trix-toolbar .trix-dialog {
  background: var(--async-surface-raised);
  border-color: var(--async-border);
  border-top-color: #6ea8fe;
  box-shadow: var(--async-shadow);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] trix-toolbar .trix-dialog.positioned {
  border: 1px solid var(--async-border);
  border-top: 2px solid #6ea8fe;
}

[data-bs-theme="dark"] trix-toolbar .trix-input--dialog {
  background: var(--async-surface-muted);
  color: var(--bs-body-color);
  border-color: var(--async-border);
}

[data-bs-theme="dark"] trix-editor .trix-button--remove {
  background-color: var(--async-surface);
}

/* Reactions */
/* (uses --async-reaction-* tokens defined above) */

/* Dropdowns */
[data-bs-theme="dark"] .dropdown-menu .dropdown-item:hover {
  background-color: rgba(110, 168, 254, 0.12);
}

[data-bs-theme="dark"] .dropdown-menu .dropdown-item.active {
  background-color: #3d7eef;
  color: #fff;
}

[data-bs-theme="dark"] .dropdown-header {
  color: #94a3b8 !important;
}

/* Select2 (quick filter + forms) */
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple,
[data-bs-theme="dark"] .select2-container--default .select2-selection--single {
  background-color: var(--async-surface-muted);
  border-color: var(--async-border);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #3d7eef;
  border-color: #3d7eef;
  color: #fff;
}

[data-bs-theme="dark"] .select2-dropdown {
  background-color: var(--async-surface-raised);
  border-color: var(--async-border);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background-color: rgba(110, 168, 254, 0.22);
  color: #fff;
}

[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
  background: var(--async-surface-muted);
  border-color: var(--async-border);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] #quick-filter-form .select2-selection {
  border-color: var(--async-border);
}

/* Meetings */
[data-bs-theme="dark"] .meeting-form-card {
  background: var(--async-surface);
  box-shadow: var(--async-glow);
}

[data-bs-theme="dark"] .meeting-person-card {
  background: var(--async-surface-muted);
  border-color: var(--async-border);
}

[data-bs-theme="dark"] .meeting-record-item:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* MBTI */
[data-bs-theme="dark"] .mbti-card {
  background: var(--async-surface);
  box-shadow: var(--async-glow);
}

[data-bs-theme="dark"] .mbti-hero-card,
[data-bs-theme="dark"] .mbti-result-hero {
  background:
    radial-gradient(circle at top right, rgba(61, 126, 239, 0.28), transparent 55%),
    linear-gradient(145deg, #151b26 0%, #101622 100%);
}

[data-bs-theme="dark"] .mbti-overline,
[data-bs-theme="dark"] .mbti-question-index,
[data-bs-theme="dark"] .mbti-type-name,
[data-bs-theme="dark"] .mbti-subtitle {
  color: #94a3b8;
}

[data-bs-theme="dark"] .mbti-title,
[data-bs-theme="dark"] .mbti-question-text,
[data-bs-theme="dark"] .mbti-scale-label {
  color: #f1f5f9;
}

[data-bs-theme="dark"] .mbti-type-code {
  color: #8bbcff;
}

[data-bs-theme="dark"] .mbti-last-result {
  border-top-color: var(--async-border);
}

[data-bs-theme="dark"] .mbti-progress,
[data-bs-theme="dark"] .mbti-axis .progress {
  background: #1e293b;
}

[data-bs-theme="dark"] .mbti-scale-option {
  border-color: var(--async-border);
  background: var(--async-surface-muted);
}

[data-bs-theme="dark"] .mbti-scale-option:hover {
  border-color: rgba(110, 168, 254, 0.45);
  background: rgba(110, 168, 254, 0.08);
}

[data-bs-theme="dark"] .mbti-scale-value {
  background: rgba(110, 168, 254, 0.18);
  color: #8bbcff;
}

/* Org chart */
[data-bs-theme="dark"] .org-children {
  border-left-color: #475569;
}

/* Auth pages with inline light styles */
[data-bs-theme="dark"] .login-container {
  background-color: var(--async-surface) !important;
  border: 1px solid var(--async-border);
  box-shadow: var(--async-glow);
}

/* Forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: var(--async-surface-muted);
  border-color: var(--async-border);
  color: var(--bs-body-color);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: var(--async-surface-muted);
  border-color: rgba(110, 168, 254, 0.55);
  color: var(--bs-body-color);
  box-shadow: 0 0 0 0.2rem rgba(110, 168, 254, 0.2);
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #64748b;
}

[data-bs-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.theme-toggle-floating {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1080;
}
