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

/*= require_tree . */

/*
  COLOR PALETTE
  primary: '#2CB9B0',
  secondary: '#F4B400',
  accent: '#FF6B6B',
  background: '#FFF8E7',
  text: '#2E2E2E',
  muted: '#6b747a',
*/

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #2E2E2E;
  margin: 0;
  padding: 0;
  background-color: #FFF8E7;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

/* Site Header */
.site-header {
  background-color: #2CB9B0;
  color: #ffffff;
  padding: 1rem;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
}

.site-title-link {
  color: #ffffff;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-link {
  color: #6b747a;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #ffffff;
}

.user-welcome {
  color: #ffffff;
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  margin: 1rem;
  border-radius: 0.25rem;
  border: 1px solid;
}

.alert-success {
  background-color: #E8F8F7;
  border-color: #2CB9B0;
  color: #1A7A73;
}

.alert-error {
  background-color: #FFE8E8;
  border-color: #FF6B6B;
  color: #D93636;
}

/* Header Section */
.header-section {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
}

.main-title {
  font-size: 2.25rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #2E2E2E;
}

.subtitle {
  font-size: 1.125rem;
  color: #6b747a;
  margin-bottom: 1.5rem;
}

/* Status Grid */
.status-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .status-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.status-card {
  display: block;
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #6b747a;
  text-decoration: none;
  transition: background-color 0.2s;
}

.status-card:hover {
  background-color: #FFF8E7;
}

.status-card-active {
  box-shadow: 0 0 0 2px #2CB9B0;
}

.status-card-pending:hover {
  background-color: #FFF9E6;
}

.status-card-approved:hover {
  background-color: #E8F8F7;
}

.status-card-rejected:hover {
  background-color: #FFE8E8;
}

.status-content {
  text-align: center;
}

.status-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2E2E2E;
  margin: 0 0 0.5rem 0;
}

.status-number-pending {
  color: #F4B400;
}

.status-number-approved {
  color: #2CB9B0;
}

.status-number-rejected {
  color: #FF6B6B;
}

.status-label {
  color: #6b747a;
  margin: 0;
}

.status-label-pending {
  color: #F4B400;
}

.status-label-approved {
  color: #2CB9B0;
}

.status-label-rejected {
  color: #FF6B6B;
}

/* Filter Heading */
.filter-heading {
  text-align: center;
  margin-bottom: 1.5rem;
}

.filter-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2E2E2E;
  margin: 0;
}

/* Jokes Grid */
.jokes-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(1, 1fr);
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .jokes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .jokes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.joke-card {
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}

.joke-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.joke-card-pending {
  border-left: 4px solid #F4B400;
}

.joke-content {
  margin-bottom: 1rem;
}

.joke-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge-pending {
  background-color: #FFF9E6;
  color: #F4B400;
}

.status-badge-approved {
  background-color: #E8F8F7;
  color: #2CB9B0;
}

.status-badge-rejected {
  background-color: #FFE8E8;
  color: #FF6B6B;
}

.joke-date {
  color: #6b747a;
  font-size: 0.875rem;
}

.joke-question {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2E2E2E;
  margin-bottom: 0.5rem;
}

.joke-answer {
  color: #6b747a;
  margin-bottom: 0.5rem;
}

.joke-submitter {
  font-size: 0.875rem;
  color: #6b747a;
  font-style: italic;
  margin-top: 0.5rem;
}

.joke-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #6b747a;
}

.action-form {
  display: inline;
}

.joke-source {
  font-size: 0.875rem;
  color: #6b747a;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #6b747a;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 0;
}

.empty-content {
  max-width: 28rem;
  margin: 0 auto;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #2E2E2E;
  margin-bottom: 0.5rem;
}

.empty-message {
  color: #6b747a;
  margin-bottom: 1.5rem;
}

.empty-actions {
  margin-top: 1rem;
}

/* Pagination */
.pagination-section {
  margin-top: 2rem;
}

.pagination-info {
  text-align: center;
  color: #6b747a;
  margin-bottom: 1rem;
}

.pagination-controls {
  display: flex;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

.btn-small {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: #2CB9B0;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #239B94;
}

.btn-success {
  background-color: #2CB9B0;
  color: #ffffff;
}

.btn-success:hover {
  background-color: #239B94;
}

.btn-danger {
  background-color: #FF6B6B;
  color: #ffffff;
}

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

/* Forms */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #6b747a;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2CB9B0;
  box-shadow: 0 0 0 3px rgba(44, 185, 176, 0.1);
}

/* Joke Submission Form Styles */
.joke-form-container {
  min-height: 100vh;
  background-color: #FFF8E7;
  padding: 3rem 1rem;
}

.joke-form-wrapper {
  max-width: 42rem;
  margin: 0 auto;
}

.joke-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.joke-form-title {
  font-size: 2.25rem;
  font-weight: bold;
  color: #2E2E2E;
  margin-bottom: 1rem;
}

.joke-form-subtitle {
  font-size: 1.125rem;
  color: #6b747a;
}

.joke-form-card {
  background-color: #ffffff;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
  padding: 2rem;
}

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

.joke-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2E2E2E;
  margin-bottom: 0.5rem;
}

.joke-form-input,
.joke-form-textarea {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #6b747a;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.joke-form-input:focus,
.joke-form-textarea:focus {
  outline: none;
  border-color: #2CB9B0;
  box-shadow: 0 0 0 3px rgba(44, 185, 176, 0.1);
}

.joke-form-help {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6b747a;
}

.joke-form-error-panel {
  background-color: #FFE8E8;
  border: 1px solid #FF6B6B;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.joke-form-error-header {
  display: flex;
  align-items: flex-start;
}

.joke-form-error-icon {
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.joke-form-error-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #FF6B6B;
}

.joke-form-error-content {
  flex: 1;
}

.joke-form-error-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #D93636;
  margin-bottom: 0.5rem;
}

.joke-form-error-list {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin: 0;
}

.joke-form-error-list li {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: #D93636;
}

.joke-form-honeypot {
  display: none;
}

.joke-form-submit-group {
  padding-top: 1rem;
}

.joke-form-submit-button {
  width: 100%;
  background-color: #2CB9B0;
  color: #ffffff;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.joke-form-submit-button:hover {
  background-color: #239B94;
}

.joke-form-submit-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 185, 176, 0.3);
}

.joke-form-footer {
  margin-top: 2rem;
  text-align: center;
}

.joke-form-footer-text {
  font-size: 0.875rem;
  color: #6b747a;
}

/* Auth Form Styles */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #FFF8E7;
  padding: 3rem 1rem;
}

.auth-form-wrapper {
  max-width: 28rem;
  width: 100%;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  margin-top: 1.5rem;
  font-size: 1.875rem;
  font-weight: 800;
  color: #2E2E2E;
}

.auth-subtitle {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b747a;
}

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

.auth-form-fields {
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
}

.auth-form-field {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #6b747a;
  color: #2E2E2E;
  font-size: 0.875rem;
}

.auth-form-field:focus {
  outline: none;
  border-color: #2CB9B0;
  box-shadow: 0 0 0 3px rgba(44, 185, 176, 0.1);
  z-index: 10;
}

.auth-form-field:first-child {
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
}

.auth-form-field:last-child {
  border-bottom-left-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  border-top: none;
}

.auth-form-field::placeholder {
  color: #6b747a;
}

.auth-remember-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.auth-remember-group {
  display: flex;
  align-items: center;
}

.auth-checkbox {
  height: 1rem;
  width: 1rem;
  color: #2CB9B0;
  border-radius: 0.25rem;
  border: 1px solid #6b747a;
}

.auth-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 185, 176, 0.1);
}

.auth-checkbox-label {
  margin-left: 0.5rem;
  display: block;
  font-size: 0.875rem;
  color: #2E2E2E;
}

.auth-submit-button {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  color: #ffffff;
  background-color: #2CB9B0;
  cursor: pointer;
  transition: background-color 0.2s;
}

.auth-submit-button:hover {
  background-color: #239B94;
}

.auth-submit-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 185, 176, 0.3);
}

.auth-links-section {
  text-align: center;
  margin-top: 1.5rem;
}

.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive adjustments */
@media (min-width: 640px) {
  .joke-form-container {
    padding: 3rem 1.5rem;
  }

  .auth-container {
    padding: 3rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .joke-form-container {
    padding: 3rem 2rem;
  }

  .auth-container {
    padding: 3rem 2rem;
  }
}

/* Focus states */
.focus-outline:focus {
  outline: 2px solid #2CB9B0;
  outline-offset: 2px;
}

/* Footer */
footer {
  background-color: #ffffff;
  margin-top: 4rem;
  padding: 2rem 0;
}

/* Public Layout Specific Styles */
.nav-text {
  color: #ffffff;
  font-size: 0.875rem;
}

.site-footer {
  background-color: #ffffff;
  margin-top: 4rem;
  padding: 2rem 0;
  text-align: center;
}

.footer-text {
  color: #2E2E2E;
  font-size: 0.875rem;
  margin: 0;
}

.footer-subtext {
  color: #6b747a;
  font-size: 0.75rem;
  margin: 0.5rem 0 0 0;
}

/* Auth Links */
.auth-link {
  color: #2CB9B0;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-link:hover {
  color: #239B94;
}
