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

/* Ensure [hidden] always wins over display rules */
[hidden] {
  display: none !important;
}

/* Page header (title + action button side by side) */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  height: 4em;
}

.page-header h1 {
  margin: 0;
  text-align: left;
}

/* Event list cards */

a.event-card {
  display: block;
  background: #fdfdff;
  border: 0.5px solid #ccc6c3;
  border-radius: 4px;
  padding: 1.1rem 1.5rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.event-card:hover {
  border-color: #50505a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.event-card-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #303039;
  margin-bottom: 0.25rem;
}

.event-card-meta {
  font-size: 0.875rem;
  color: #555;
}

/* Events summary list (home/dashboard card) */

.events-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.events-summary-list li + li {
  margin-top: 0;
  border-top: 0.5px solid #eee;
}

.events-summary-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
  text-decoration: none;
  color: inherit;
}

.events-summary-list a:hover .events-summary-name {
  color: #33f;
}

.events-summary-name {
  font-weight: 600;
  color: #303039;
}

.events-summary-date {
  font-size: 0.875rem;
  color: #555;
  white-space: nowrap;
}

.session-info {
  font-size: 12px;
  text-align: center;
  color: #606069;
}

.events-summary-footer {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  border-top: 0.5px solid #eee;
  padding-top: 0.6rem;
}

/* Event action buttons row */

.event-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
  height: 4em;
}

.event-actions--end {
  justify-content: flex-end;
}

.event-form-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.event-actions-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Shared form elements */
.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 1rem;
  font-family: "Open Sans", sans-serif;
  border: 1px solid #ccc6c3;
  border-radius: 3px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
}

.input:focus {
  border-color: #50505a;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.4rem;
  font-size: 0.95rem;
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  color: #fdfdff;
  background: #303039;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn:hover {
  background: #50505a;
  color: #fdfdff;
  text-decoration: none;
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border: 1px solid #000;
}

.btn--secondary:hover {
  background: #fafafc;
  color: #505059;
  border-color: #000;
}

.btn.btn--danger {
  background: #fff0f0;
  color: #BA160C;
  border: 1px solid #f5c6c6;
}

.btn.btn--danger:hover {
  background: #BA160C;
  color: #fff;
  border-color: #BA160C;
}

/* Musicians table (dashboard) */

.musicians-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.musicians-table th {
  text-align: left;
  font-weight: 600;
  color: #555;
  padding: 0.4rem 0.75rem 0.4rem 0;
  border-bottom: 0.5px solid #ddd;
}

.musicians-table td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 0.5px solid #eee;
  color: #303039;
}

.musicians-table tbody tr:last-child td {
  border-bottom: none;
}

.musicians-table-row:hover td {
  background: #f5f5f8;
}

.musicians-table-link {
  display: block;
  padding: 0.5rem 0.75rem 0.5rem 0;
  color: inherit;
  text-decoration: none;
}

.musicians-table td:has(.musicians-table-link) {
  padding: 0;
}

/* Instrument display */

.event-card-instruments {
  font-size: 0.875rem;
  color: #555;
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
}

.instrument-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Instrument nested form rows */

.instrument-row {
  display: grid;
  grid-template-columns: 1fr 4rem 5rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 0.5px solid #eee;
}

.instrument-row--header {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  padding-bottom: 0.4rem;
}

.instrument-row--header span:nth-child(2) {
  text-align: center;
}

.instrument-row input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0 auto;
  display: block;
  cursor: pointer;
}

.instrument-add {
  margin-top: 0.75rem;
}

.btn--sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.btn--secondary-dark, .btn--secondary-dark:visited, div.page-content a.btn.btn--secondary-dark, div.page-content a.btn.btn--secondary-dark:visited {
  background: transparent;
  color: #303039;
  border: 1px solid #303039;
}

.btn--secondary-dark:hover, div.page-content a.btn.btn--secondary-dark:hover {
  background: #303039;
  color: #fdfdff;
}

/* User permission rows */

.permission-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 0.5px solid #eee;
}

.permission-row:last-child {
  border-bottom: none;
}

.permission-row__checkbox {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.permission-row__checkbox--locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  font-size: 0.8rem;
  color: #aaa;
}

.permission-row__label {
  font-size: 0.9rem;
  color: #303039;
}

.permission-row__label--locked {
  color: #aaa;
}

.user-permission-cell {
  text-align: center;
  color: #27ae60;
  font-weight: 600;
}

/* Custom questions nested form */

.custom-question-row {
  border: 0.5px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fafafc;
}

.custom-question-row__fields {
  display: grid;
  grid-template-columns: 1fr 10rem;
  gap: 0.75rem;
  align-items: start;
}

.custom-question-row__remove {
  margin-top: 0.75rem;
  text-align: right;
}

.custom-question-choices {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 0.5px solid #ddd;
}

.custom-question-choices__list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.choice-row .input {
  margin: 0;
}

.custom-question-choices__add {
  margin-top: 0.5rem;
}

/* Custom question answer table */

.response-answers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.response-answers-table th {
  text-align: left;
  font-weight: 600;
  color: #555;
  padding: 0.4rem 0.75rem 0.4rem 0;
  border-bottom: 0.5px solid #ddd;
}

.response-answers-table td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 0.5px solid #eee;
  color: #303039;
  vertical-align: top;
}

.response-answers-table tbody tr:last-child td {
  border-bottom: none;
}

.response-answers-table td:first-child {
  white-space: nowrap;
  width: 12rem;
}

.response-answers-table__long-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.response-answers-table__long-text p {
  margin: 0 0 0.5em;
}

.response-answers-table__long-text p:last-child {
  margin-bottom: 0;
}

/* Event responses list */

.responses-instrument-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  margin: 1.25rem 0 0.4rem;
  padding-bottom: 0.3rem;
  border-bottom: 0.5px solid #ddd;
}

.responses-instrument-heading:first-child {
  margin-top: 0;
}

.responses-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.responses-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 0.5px solid #f0f0f0;
  font-size: 0.9rem;
}

.responses-list__item:last-child {
  border-bottom: none;
}

.responses-list__name {
  flex: 1;
  color: #303039;
}

.responses-list__attendance {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: #f0f0f4;
  color: #555;
  width: 6.75em;
}

.responses-list__attendance--yes {
  background: #f0fff4;
  color: #166135;
}

.responses-list__attendance--no {
  background: #fff0f0;
  color: #BA160C;
}

.responses-list__attendance--maybe {
  background: #fffbf0;
  color: #d68910;
}

.responses-list__edit {
  font-size: 0.8rem;
  color: #339;
}

/* Invite guests page */
.invite-guests__subtitle {
  color: #555;
  margin: -0.5rem 0 1.25rem;
}

.invite-guests__filters {
  display: flex;
  gap: 0.35rem;
}

.btn--filter {
  padding: 0.25rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  color: #333;
}

.btn--filter-active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

.invite-guests__list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.invite-guests__item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
}

.invite-guests__item:last-child {
  border-bottom: none;
}

.invite-guests__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
}

.invite-guests__name {
  font-weight: 600;
}

.invite-guests__instruments {
  font-size: 0.875rem;
  color: #555;
  flex: 1;
}

.badge {
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  font-weight: 600;
}

.badge--sub {
  background: #e8f0fe;
  color: #1a56db;
}

.badge--inactive {
  background: #f3f4f6;
  color: #555;
}

.btn--cancel {
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
  margin-top: 0.5rem;
}

.event-notice-sent {
  color: #27ae60;
  font-size: 0.95rem;
  margin: 0;
}

.request-reminder {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.request-reminder__label {
  font-size: 0.9rem;
  color: #555;
  margin: 0 0 0.5rem;
}

.request-reminder__form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.request-reminder__form .input {
  flex: 1;
}

.communication-log {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  border-top: 1px solid #e5e7eb;
  padding-top: 0.75rem;
}

.communication-log__entry {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.2rem 0;
  font-size: 0.85rem;
  color: #555;
}

.communication-log__action {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

/* Flash messages */
.flash {
  padding: 0.65rem 1rem;
  border-radius: 3px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.flash--alert {
  background: #fff0f0;
  color: #BA160C;
  border: 0.5px solid #f5c6c6;
}

.flash--notice {
  background: #f0fff4;
  color: #27ae60;
  border: 0.5px solid #b8e8c8;
}
