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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  color: #1a1a1a;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #ddd;
}

.app-nav a,
.app-nav button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.app-main {
  padding: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.flash {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.flash-alert {
  background: #fdecea;
  color: #7a1f1f;
}

.flash-notice {
  background: #e8f5e9;
  color: #1f4a20;
}

form input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  font-size: 1rem;
}

form input[type="submit"] {
  width: auto;
}

video {
  max-width: 100%;
  height: auto;
}

audio {
  width: 100%;
}

.messages-scroll {
  overflow-y: auto;
  max-height: 60vh;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem;
  margin-bottom: 0.75rem;
}

.message {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.message-author {
  font-weight: 600;
  margin-right: 0.5rem;
}

.message-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0.25rem 0;
}

.message-form textarea {
  width: 100%;
  min-height: 44px;
  font-size: 1rem;
  padding: 0.5rem;
}

.unread-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #d32f2f;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.25rem;
  text-align: center;
  margin-left: 0.35rem;
}
