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

/* Dark Theme Default Styling */
.dark-theme {
  font-family:
    "Inter var",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  line-height: 1.5;
  background-color: #1a1a1a;
  /* background-image: url("/assets/ground/desk-mat-cream-8b49256d.avif"); */
  color: #e2e8f0;
  min-height: 100vh;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  /* padding: 1.5rem; - removed to eliminate 24px padding */
  padding: 0; /* Explicitly set to 0 to override any cached styles */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
}

/* Dark Theme Typography */
.dark-theme h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #f0f0f0;
}

.dark-theme h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #f0f0f0;
}

.dark-theme h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f0f0f0;
}

.dark-theme h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #f0f0f0;
}

.dark-theme p {
  margin-bottom: 1rem;
  color: #cbd5e0;
}

.dark-theme a {
  color: #63b3ed;
  text-decoration: underline;
  transition: color 0.2s;
}

.dark-theme a:hover {
  color: #90cdf4;
}

/* Dark Theme Form Elements */
.dark-theme input,
.dark-theme select,
.dark-theme textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #4a5568;
  border-radius: 0.25rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  margin-bottom: 1rem;
  background-color: #2d3748;
  color: #e2e8f0;
}

.dark-theme input::placeholder,
.dark-theme textarea::placeholder {
  color: #a0aec0;
}

.dark-theme input:focus,
.dark-theme select:focus,
.dark-theme textarea:focus {
  outline: none;
  border-color: #63b3ed;
  box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.2);
}

.dark-theme button,
.dark-theme .button,
.dark-theme input[type="submit"] {
  display: inline-block;
  padding: 0.5rem 1rem;
  color: white;
  font-weight: 500;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

/* Dark Theme Tables */
.dark-theme table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.dark-theme th {
  background-color: #2d3748;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid #4a5568;
  color: #e2e8f0;
}

.dark-theme td {
  padding: 0.75rem;
  border: 1px solid #4a5568;
  color: #cbd5e0;
}

.dark-theme tbody tr:nth-child(even) {
  background-color: #2a2a2a;
}

.dark-theme tbody tr:hover {
  background-color: #374151;
}

/* Dark Theme Lists */
.dark-theme ul,
.dark-theme ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.dark-theme li {
  margin-bottom: 0.25rem;
  color: #cbd5e0;
}

.dark-theme blockquote {
  border-left: 4px solid #4a5568;
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #a0aec0;
}

.dark-theme code {
  font-family:
    "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
  background-color: #2d3748;
  color: #e2e8f0;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.dark-theme pre {
  background-color: #2d3748;
  padding: 1rem;
  border-radius: 0.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  color: #e2e8f0;
}

/* Button color overrides for dark theme */
.dark-theme a.bg-blue-600,
.dark-theme a.bg-green-600,
.dark-theme a.bg-red-600,
.dark-theme button.bg-blue-600,
.dark-theme button.bg-green-600,
.dark-theme button.bg-red-600 {
  color: white !important;
  text-decoration: none !important;
}

.dark-theme a.bg-blue-600:hover,
.dark-theme a.bg-green-600:hover,
.dark-theme a.bg-red-600:hover,
.dark-theme button.bg-blue-600:hover,
.dark-theme button.bg-green-600:hover,
.dark-theme button.bg-red-600:hover {
  color: white !important;
}

/* Button danger class for dark theme */
.dark-theme button.button-danger,
.dark-theme input.button-danger,
.dark-theme input[type="submit"].button-danger {
  background-color: #f97316;
  color: #fff;
}

.dark-theme button.button-danger:hover,
.dark-theme input.button-danger:hover,
.dark-theme input[type="submit"].button-danger:hover {
  background-color: #ea580c;
}

/* Form button_to styling */
.dark-theme form.button_to {
  display: inline-block;
}

/* Utility Classes for Dark Theme */
.dark-theme .text-center {
  text-align: center;
}

.dark-theme .mb-4 {
  margin-bottom: 1rem;
}

.dark-theme .mt-4 {
  margin-top: 1rem;
}

.dark-theme .flex {
  display: flex;
}

.dark-theme .items-center {
  align-items: center;
}

.dark-theme .justify-between {
  justify-content: space-between;
}

.dark-theme .gap-4 {
  gap: 1rem;
}

/* Custom gray color for dark theme */
.dark-theme .bg-gray-750 {
  background-color: #252525;
}

.dark-theme .bg-gray-800 {
  background-color: #1f1f1f;
}

.dark-theme .bg-gray-700 {
  background-color: #333333;
}

.dark-theme .hover\:bg-gray-750:hover {
  background-color: #252525;
}

/* Legacy styles (for backwards compatibility) */
body {
  font-family:
    "Inter var",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
  line-height: 1.5;
  color: #1a202c;
}

h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a202c;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #2d3748;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2d3748;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #4a5568;
}

p {
  margin-bottom: 1rem;
  color: #4a5568;
}

a {
  color: #3182ce;
  text-decoration: underline;
  transition: color 0.2s;
}

a:hover {
  color: #2c5282;
}

/* Button Links - overrides the default link styles */
a.bg-blue-600,
a.bg-green-600,
a.bg-red-600 {
  color: white !important;
  text-decoration: none !important;
}

a.bg-blue-600:hover,
a.bg-green-600:hover,
a.bg-red-600:hover {
  color: white !important;
}

ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: 0.25rem;
}

blockquote {
  border-left: 4px solid #e2e8f0;
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #4a5568;
}

code {
  font-family:
    "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
  background-color: #f7fafc;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

pre {
  background-color: #f7fafc;
  padding: 1rem;
  border-radius: 0.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

/* Form Elements */
input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  margin-bottom: 1rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #63b3ed;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

button,
.button,
input[type="submit"] {
  display: inline-block;
  padding: 0.5rem 1rem;
  /* background-color removed – Tailwind utilities will set colours */
  color: white;
  font-weight: 500;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

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

/* --------------------------------------------------------------
 *  Dedicated button colour class
 *  Higher specificity than the generic `button` selector.
 *  Uses Tailwind's orange‑600 (hex #f97316) and orange‑700 for hover.
 * -------------------------------------------------------------- */
button.button-danger,
input.button-danger,
input[type="submit"].button-danger {
  background-color: #f97316; /* Tailwind bg‑orange‑600 */
  color: #fff;
}

button.button-danger:hover,
input.button-danger:hover,
input[type="submit"].button-danger:hover {
  background-color: #ea580c; /* Tailwind bg‑orange‑700 */
}

/* Style button_to form elements to display inline */
form.button_to {
  display: inline-block;
}

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

th {
  background-color: #f7fafc;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
}

td {
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.mb-4 {
  margin-bottom: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: 1rem;
}
