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

/* Basic styling */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #333;
}

/* Header and Navigation */
header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem 0;
}

nav .nav-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

nav h1 {
  margin: 0;
  font-size: 1.5rem;
}

nav h1 a {
  text-decoration: none;
  color: #007bff;
}

nav .nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav .nav-links li {
  margin-left: 20px;
}

nav .nav-links a {
  text-decoration: none;
  color: #007bff;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

nav .nav-links a:hover {
  background-color: #e9ecef;
}

/* Main content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Flash messages */
.notice, .alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.notice {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table th, table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

table th {
  background-color: #f8f9fa;
  font-weight: bold;
}

table tr:hover {
  background-color: #f8f9fa;
}

/* Forms */
form {
  margin-bottom: 20px;
}

.field {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
}

textarea {
  height: 100px;
  resize: vertical;
}

input[type="checkbox"] {
  margin-right: 10px;
}

input[type="submit"], .button {
  background-color: #007bff;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
}

input[type="submit"]:hover, .button:hover {
  background-color: #0069d9;
}

/* Error messages */
#error_explanation {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  border: 1px solid #f5c6cb;
}

#error_explanation h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

#error_explanation ul {
  margin-bottom: 0;
}

/* Actions */
.actions {
  margin-top: 20px;
}

.actions a {
  margin-right: 10px;
}

/* Media file styling */
.media-section {
  margin: 20px 0;
  padding: 20px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background-color: #f8f9fa;
}

.media-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.media-item {
  border: 1px solid #ced4da;
  border-radius: 4px;
  overflow: hidden;
  background-color: white;
}

.media-image {
  width: 100%;
  height: auto;
  display: block;
}

.media-video {
  width: 100%;
  height: auto;
  max-height: 300px;
}

.media-filename {
  padding: 10px;
  margin: 0;
  background-color: #f8f9fa;
  font-size: 0.9rem;
  color: #6c757d;
  word-break: break-all;
}

/* Form file input styling */
input[type="file"] {
  width: 100%;
  padding: 8px 0;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
}

small {
  display: block;
  margin-top: 5px;
  color: #6c757d;
  font-size: 0.85rem;
}

/* Media list in forms */
.media-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.media-list li {
  padding: 8px 12px;
  background-color: #e9ecef;
  border-radius: 4px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.media-list li a {
  color: #dc3545;
  font-size: 0.9rem;
}
