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

@media (max-width: 768px) {
  .attendance-table thead {
    display: none;
  }

  .attendance-table tbody {
    display: block;
  }

  .attendance-table tr.attendance-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
  }

  .attendance-table td {
    display: block;
    padding: 0;
  }

  .attendance-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.2rem;
  }

  .attendance-table td[data-label=""]::before {
    display: none;
  }

  .attendance-table td.student-cell {
    grid-column: span 2;
    margin-bottom: 0.25rem;
  }

  .attendance-table td.status-cell {
    grid-column: span 2;
  }

  .attendance-table td.meta-cell {
    font-size: 0.9rem;
    grid-column: span 2;
  }

  .attendance-table td.recorded-cell {
    grid-column: span 2;
    text-align: left;
  }

  .attendance-table td.status-cell .flex {
    width: 100%;
  }

.attendance-table td.status-cell button {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: calc(50% - 0.5rem);
    justify-content: center;
  }
}

.status-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.status-modal.hidden {
  display: none;
}

.status-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 5;
}

.status-modal__panel {
  position: relative;
  z-index: 10;
  width: min(90vw, 360px);
  border-radius: 1.5rem;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.15);
}

body.overflow-hidden {
  overflow: hidden;
}
