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

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Container for the entire app */
.container {
  width: 100%;
  max-width: 600px; /* Limit the max width for mobile screens */
  margin: 0 auto;
  padding: 15px;
  background-color: white;
  border-radius: 10px;
}

.admin-layout .container {
  max-width: 1200px; /* Wider container for admin layout */
}

.admin-layout .container button,
.admin-layout .container input[type="submit"],
.admin-layout .container a.button {
  display: inline-block;
  width: auto; /* Allow buttons to take their natural width */
}

.admin-layout .container a.button.clear-button,
.admin-layout .container a.button.secondary,
.admin-layout .container a.button.primary {
  padding: 4px 8px;
}

.admin-layout .filter-fields input {
  margin: 0;
}

/* Header styles */
header {
  text-align: center;
  padding: 10px;
}

header h1 {
  font-size: 1.8rem;
  color: #5e2a8c; /* Purple theme */
}

header img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-top: 10px;
}

/* Profile Section */
.profile-info {
  margin: 20px 0;
  text-align: center;
}

.profile-info h2 {
  font-size: 1.5rem;
  color: #5e2a8c;
}

.profile-info p {
  font-size: 1rem;
  color: #777;
  margin-top: 5px;
}

/* Frequency Section */
.frequencies {
  margin-top: 30px;
}

.frequencies h3 {
  font-size: 1.4rem;
  color: #5e2a8c;
  margin-bottom: 10px;
}

.frequencies ul {
  list-style-type: none;
}

.frequencies ul li {
  padding: 10px;
  margin: 5px 0;
  background-color: #eee;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.frequencies ul li.present {
  background-color: lightgreen;
}

.frequencies ul li.missed {
  background-color: lightcoral;
}

.frequencies ul li span {
  font-weight: bold;
}

/* Buttons */
button,
a.button,
input[type="submit"] {
  width: 100%;
  padding: 10px;
  background-color: #5e2a8c;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  margin-top: 15px;
  cursor: pointer;
}

button:disabled,
button:hover:disabled {
  background-color: #aac;
  cursor: not-allowed;
}

a.button {
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

a.button.secondary {
  background-color: #777; /* Grey for secondary actions */
}

a.button.secondary:hover {
  background-color: #555; /* Darker grey on hover */
}

button:hover,
a.button.primary:hover,
input[type="submit"]:hover {
  background-color: #ec34f8;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  header h1 {
    font-size: 1.6rem;
  }

  .profile-info h2 {
    font-size: 1.3rem;
  }

  .frequencies h3 {
    font-size: 1.2rem;
  }

  .frequencies ul li {
    font-size: 0.9rem;
  }

  button,
  input[type="submit"] {
    font-size: 1rem;
  }
}

/* Navigation styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #5e2a8c;
  padding: 15px;
  color: white;
}

.logo {
  font-size: 1.4rem;
  font-weight: bold;
}

.logo a {
  color: white;
  text-decoration: none;
}

.hamburger {
  font-size: 1.8rem;
  cursor: pointer;
  display: block;
}

/* Menu list */
.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background-color: #5e2a8c;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  z-index: 1000;
}

.nav-menu li {
  border-top: 1px solid #7e4dc4;
}

.nav-menu li a {
  color: white;
  text-decoration: none;
  padding: 15px;
  display: block;
}

/* Show menu when open */
.nav-menu.open {
  display: flex;
}

/* Optional: smooth animation */
.nav-menu {
  transition: all 0.3s ease;
}

/* Media query to adjust for larger screens */
@media screen and (min-width: 768px) {
  .hamburger {
    display: none;
  }

  .nav-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    gap: 20px;
    background-color: transparent;
  }

  .nav-menu li {
    border: none;
  }

  .nav-menu li a {
    padding: 10px;
  }
}

video {
  max-width: 100%;
  opacity: 0.3;

  max-height: 570px;
}

video.active {
  opacity: 1;
}

/* Common styles for both messages */
.message {
  padding: 1em;
  margin: 1em 0;
  border-radius: 5px;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  width: 100%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

/* Success message styling */
.success {
  background-color: #e6ffed;
  color: #2d7a46;
  border: 1px solid #8cd9a1;
}

/* Error message styling */
.error {
  background-color: #ffe6e6;
  color: #a94442;
  border: 1px solid #e89f9f;
}

/* Form inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}

input.inline {
  width: auto;
}

/* Inline form styles */
form.inline {
  display: flex;
  gap: 8px;
  align-items: center;
}
form.inline textarea {
  flex: 1;
  min-height: 50px;
  resize: vertical;
  margin: 0;
}
form.inline button[type="submit"] {
  margin-top: 0;
  background-color: transparent;
  padding: 0;
}

form.button_to {
  display: inline-block;
}
form.button_to button {
  margin-top: 0;
  background-color: transparent;
  padding: 0;
}
form.button_to svg {
  margin-left: 10px;
  margin-bottom: -5px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #5e2a8c;
  box-shadow: 0 0 3px rgba(94, 42, 140, 0.5);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    font-size: 1rem;
    padding: 10px;
  }
}

/* Activities Table and Filter Form */
.filter-form {
  margin-bottom: 20px;
}
.filter-form .filter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.filter-form label {
  font-weight: bold;
}
.filter-form .button.filter-button,
.filter-form .button.clear-button {
  padding: 8px 12px;
  background-color: #5e2a8c;
  color: white;
  border-radius: 4px;
  border: none;
  text-decoration: none;
}
.filter-form .button.clear-button {
  background-color: #777;
}

.filter-form input[type="text"] {
  padding: 7px 6px;
}
.filter-form input[type="date"],
.filter-form select {
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.filter-form select {
  margin-bottom: 0;
}

.activities-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.activities-table th,
.activities-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}
.activities-table th {
  background-color: #f2f2f2;
}
.activities-table tr:nth-child(even) {
  background-color: #f9f9f9;
}
.activities-table tr:hover {
  background-color: #f1f1f1;
}

/* Inline validation styles */
.inline-error {
  color: #a94442;
  font-size: 0.875rem;
  margin-top: -10px;
  margin-bottom: 10px;
}

.field_with_errors input,
.field_with_errors textarea,
.field_with_errors select {
  border-color: #a94442;
  background-color: #fff0f0;
}

.profile-image-preview img {
  max-height: 150px;
}

.admin-activity-show {
  text-align: center;
}

@media print {
  nav.navbar {
    display: none;
  }

  .admin-activity-show img#qr-code {
    width: 80%;
  }

  .admin-activity-show {
    font-size: 30pt;
  }
}
