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

/* Flash Messages */
.notice {
  background-color: #d4edda;
  color: #155724;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
}

.alert {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

/* Navigation */
.navbar {
  background-color: #f8f9fa;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1rem;
}

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

.navbar-nav a:hover {
  color: #0056b3;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
}

/* Form Sections for Edit Form */
.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e9ecef;
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.form-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0071e3;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1d1d1f;
  font-size: 0.9rem;
}

.form-text {
  font-size: 0.8rem;
  color: #86868b;
  margin-top: 0.25rem;
  display: block;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.form-check-input {
  margin: 0;
}

.form-check-label {
  font-weight: 500;
  color: #1d1d1f;
  margin: 0;
}

/* Responsive form rows */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .form-row .form-group {
    margin-bottom: 1rem;
  }
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

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

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

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

/* Marketing Homepage Styles */
.bg-gradient {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Apple-like Authentication Styles */
.auth-container {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 400px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.auth-card.wide {
  max-width: 800px;
  text-align: left;
}

.auth-header {
  margin-bottom: 2.5rem;
}

.auth-title {
  font-size: 2rem;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 1rem;
  color: #86868b;
  margin: 0;
  font-weight: 400;
}

.auth-form {
  margin-bottom: 2rem;
}

.auth-form .form-group {
  margin-bottom: 1.5rem;
}

.auth-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-input:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.auth-input::placeholder {
  color: #86868b;
}

/* Style textarea specifically */
.auth-input[type="textarea"],
.auth-input[rows] {
  resize: vertical;
  min-height: 80px;
}

.auth-button {
  width: 100%;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #0071e3 0%, #0077ed 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.auth-button:hover {
  background: linear-gradient(135deg, #0077ed 0%, #0071e3 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.4);
}

.auth-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.3);
}

.remember-me {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.9rem;
  color: #86868b;
  position: relative;
  padding-left: 2rem;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid #d2d2d7;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.checkbox-container:hover .checkmark {
  border-color: #0071e3;
}

.checkbox-input:checked ~ .checkmark {
  background-color: #0071e3;
  border-color: #0071e3;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-input:checked ~ .checkmark:after {
  display: block;
}

.auth-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.auth-link {
  color: #0071e3;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: #0077ed;
  text-decoration: none;
}

.auth-link-secondary {
  color: #86868b;
}

.auth-link-secondary:hover {
  color: #1d1d1f;
}

.auth-divider {
  position: relative;
  width: 100%;
  text-align: center;
  margin: 1rem 0;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #d2d2d7;
}

.auth-divider span {
  background: rgba(255, 255, 255, 0.95);
  padding: 0 1rem;
  color: #86868b;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Error messages styling */
.field_with_errors .auth-input {
  border-color: #ff3b30;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.error-messages {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.2);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #ff3b30;
  font-size: 0.9rem;
}

.error-messages h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
  color: #ff3b30;
}

.error-messages ul {
  margin: 0;
  padding-left: 1.5rem;
}

.error-messages li {
  margin-bottom: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
  
  .auth-title {
    font-size: 1.75rem;
  }
  
  .auth-container {
    padding: 1rem;
  }
}
