/*
 * 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.
 */

table {
  border-color: var(--component-border-color, var(--table-border-color, var(--color-border))) !important;
}

.primary-action,
button.bg-primary,
input[type="submit"].bg-primary,
a.bg-primary {
  background-color: var(--color-primary-button, var(--color-primary)) !important;
}

.primary-action:hover,
button.bg-primary:hover,
input[type="submit"].bg-primary:hover,
a.bg-primary:hover {
  background-color: var(--color-primary-button, var(--color-primary)) !important;
  filter: brightness(0.94);
}

button.border-primary,
a.border-primary,
input[type="submit"].border-primary {
  border-color: var(--color-border) !important;
  color: var(--color-secondary) !important;
}

.floating-field {
  position: relative;
}

.floating-field .floating-input {
  min-height: 3.25rem;
}

.floating-field .floating-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.floating-field .floating-label {
  pointer-events: none;
  position: absolute;
  left: 0.75rem;
  top: 50%;
  max-width: calc(100% - 1.5rem);
  transform: translateY(-50%);
  color: var(--color-secondary);
  font-size: 0.875rem;
  line-height: 1;
  transition: transform 160ms ease, top 160ms ease, font-size 160ms ease, color 160ms ease;
}

.floating-field .floating-input:focus + .floating-label,
.floating-field .floating-input:not(:placeholder-shown) + .floating-label,
.floating-field .floating-input.is-filled + .floating-label {
  top: 0.6rem;
  transform: translateY(0);
  color: var(--color-primary);
  font-size: 0.75rem;
}

table thead,
table tbody,
table tr,
table th,
table td {
  border-color: var(--component-border-color, var(--table-border-color, var(--color-border))) !important;
}

.rounded-md:is(.bg-white, .bg-background, .overflow-hidden),
.rounded-lg:is(.bg-white, .bg-background, .overflow-hidden),
.rounded-md:has(> form),
.rounded-md:has(> table),
.rounded-md:has(> .overflow-x-auto > table),
.rounded-md:has(> [role="dialog"]),
.rounded-md:has(> .border-b),
.rounded-md.border,
.rounded-lg.border {
  border-color: var(--component-border-color, var(--color-border)) !important;
  border-width: var(--component-border-width, 1px) !important;
  box-shadow: var(--component-shadow, 0 1px 2px rgb(0 0 0 / 0.06)) !important;
}

input,
select,
textarea,
label.border,
.border-border,
.border-b,
.border-t,
.border {
  border-color: var(--component-border-color, var(--color-border)) !important;
}

input.border,
select.border,
textarea.border,
label.border {
  border-width: var(--component-border-width, 1px) !important;
}

button.border,
a.border {
  border-color: var(--color-border) !important;
  border-width: 1px !important;
}

.danger-delete-button {
  border-color: #b91c1c !important;
  background-color: #dc2626 !important;
  color: #fff !important;
}

.danger-delete-button:hover {
  border-color: #991b1b !important;
  background-color: #b91c1c !important;
  color: #fff !important;
}

.modal-close-button {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  background: transparent !important;
  color: #dc2626 !important;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.modal-close-button:hover {
  background: transparent !important;
  color: #991b1b !important;
}

.modal-close-button:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.rich-text-composer:focus-within {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 1px var(--color-primary);
}

.rich-text-tool {
  display: inline-flex;
  min-width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  padding: 0 0.5rem;
  color: var(--color-secondary);
  font-size: 0.75rem;
  line-height: 1;
}

.rich-text-tool:hover,
.rich-text-tool:focus-visible {
  background-color: #e2e8f0;
  outline: none;
}

.rich-text-select {
  height: 2rem;
  max-width: 8rem;
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  background: #fff;
  padding: 0 0.375rem;
  color: var(--color-secondary);
  font-size: 0.75rem;
}

.rich-text-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--color-muted);
  pointer-events: none;
}

.rich-text-editor ul,
.published-rich-text ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  list-style: disc;
}

.rich-text-editor ol,
.published-rich-text ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  list-style: decimal;
}

.rich-text-editor blockquote,
.published-rich-text blockquote {
  margin: 0.75rem 0;
  border-left: 3px solid var(--color-border);
  padding-left: 0.75rem;
  color: var(--color-secondary);
}

.rich-text-editor a,
.published-rich-text a {
  color: var(--color-primary);
  text-decoration: underline;
}

.rich-text-attachment {
  display: inline-block;
  margin: 0.125rem;
  border: 1px solid var(--color-border);
  border-radius: 0.375rem;
  background: var(--color-background);
  padding: 0.25rem 0.5rem;
}

.rich-text-editor figure,
.published-rich-text figure {
  margin: 0.75rem 0;
}

.rich-text-editor figure img,
.published-rich-text figure img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

.rich-text-editor figure img[data-selected="true"] {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.rich-text-editor figcaption,
.published-rich-text figcaption {
  margin-top: 0.25rem;
  color: var(--color-muted);
  font-size: 0.75rem;
  text-align: center;
}

.app-file-input {
  padding-right: 0.75rem;
}

.app-file-input::file-selector-button {
  min-height: 2.75rem;
  margin-right: 0.75rem;
  border: 0;
  border-right: 1px solid var(--color-border);
  background-color: var(--color-primary);
  padding: 0 1rem;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.app-file-input::file-selector-button:hover {
  filter: brightness(0.94);
}

.material-general-input::placeholder {
  color: var(--color-muted);
  opacity: 1;
}

.navbar-institution-label {
  visibility: visible !important;
  opacity: 1 !important;
}

table tr.lesson-session-completed,
table tr.lesson-session-completed td,
table[data-controller~="responsive-table"] tr.lesson-session-completed,
table[data-controller~="responsive-table"] tr.lesson-session-completed td {
  background-color: var(--color-success) !important;
  color: #fff !important;
}

table tr.lesson-session-completed td::before {
  color: rgb(255 255 255 / 0.75) !important;
}

table tr.lesson-session-cancelled,
table tr.lesson-session-cancelled td,
table[data-controller~="responsive-table"] tr.lesson-session-cancelled,
table[data-controller~="responsive-table"] tr.lesson-session-cancelled td {
  background-color: var(--color-danger) !important;
  color: #fff !important;
}

table tr.lesson-session-cancelled td::before {
  color: rgb(255 255 255 / 0.75) !important;
}

.sidebar-mobile-trigger {
  display: none;
}

.institution-sidebar nav {
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 768px) {
  table[data-responsive-table="false"] .attendance-details-column {
    display: table-cell !important;
  }

  table[data-responsive-table="false"] .attendance-status-label {
    display: inline !important;
  }
}

@media (max-width: 767px) {
  .institution-sidebar {
    width: 16rem !important;
    height: 100dvh;
    transform: translateX(-100%);
  }

  .institution-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 0 1.5rem 3rem rgb(0 0 0 / 0.25);
  }

  .sidebar-mobile-trigger {
    position: fixed;
    top: 0.75rem;
    left: 0;
    z-index: 50;
    display: flex;
    height: 2.5rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0 0.625rem 0.625rem 0;
    background: #000;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 0.25rem 0.75rem rgb(0 0 0 / 0.18);
  }

  .institution-sidebar.mobile-open + .sidebar-mobile-trigger {
    display: none;
  }

  main[data-sidebar-target="content"] {
    padding-left: 0 !important;
  }

  [data-sidebar-target="navbar"] {
    left: 0 !important;
    padding-left: 2.75rem;
    padding-right: 0.75rem;
  }

  main > section {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  table[data-controller~="responsive-table"] {
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
  }

  table[data-controller~="responsive-table"] thead {
    display: none;
  }

  table[data-controller~="responsive-table"] tbody,
  table[data-controller~="responsive-table"] tr,
  table[data-controller~="responsive-table"] td {
    display: block;
    width: 100%;
  }

  table[data-controller~="responsive-table"] tr {
    cursor: pointer;
    overflow: hidden;
    border: var(--component-border-width, 1px) solid var(--component-border-color, var(--table-border-color, var(--color-border)));
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: var(--component-shadow, var(--table-shadow, 0 1px 2px rgb(0 0 0 / 0.06)));
  }

  table[data-controller~="responsive-table"] td {
    border: 0 !important;
    padding: 0.75rem 1rem !important;
  }

  table[data-controller~="responsive-table"] td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: var(--color-muted);
    text-transform: uppercase;
  }

  table[data-controller~="responsive-table"] tr:not(.is-expanded) td:nth-child(n+3) {
    display: none;
  }

  table[data-controller~="responsive-table"] tr:not(.is-expanded) td:first-child,
  table[data-controller~="responsive-table"] tr:not(.is-expanded) td:nth-child(2) {
    display: block;
  }

  table[data-controller~="responsive-table"] tr::after {
    content: "Toque para ver detalhes";
    display: block;
    padding: 0 1rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-muted);
  }

  table[data-controller~="responsive-table"] tr.is-expanded::after {
    content: "Toque para recolher";
  }
}
/* Mantém o login centralizado em toda a tela, sem rolagem. */
.sign-in-screen {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
