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

:root {
  --app-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --btn-radius: 8px;
  --btn-font-size: 14px;
  --btn-font-weight: 600;
  --btn-padding-y: 10px;
  --btn-padding-x: 14px;
}

html, body {
  font-family: var(--app-font-family);
}

button, input, select, textarea {
  font-family: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  border: 1px solid transparent;
  text-decoration: none;
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: #667eea;
  color: #fff;
  border-color: #667eea;
}

.btn-primary:hover {
  background: #5568d3;
  border-color: #5568d3;
}

.btn-secondary {
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-danger {
  background: #fff1f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}

.btn-outline {
  background: transparent;
  color: #374151;
  border-color: #d1d5db;
}

.btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-info {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.btn-info:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 20px;
  font-size: 16px;
}

/* ==== Form fields ==== */
.form-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 6px;
}

.form-control {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  appearance: none;
}

.form-control:hover:not(:disabled):not(:focus) {
  border-color: #9ca3af;
}

.form-control:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.form-control::placeholder {
  color: #9ca3af;
}

textarea.form-control {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 32px;
}

.form-control-sm {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.form-control-lg {
  height: 48px;
  padding: 0 14px;
  font-size: 16px;
}

.form-help {
  display: block;
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.form-help code {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: #4b5563;
}

.form-error {
  display: block;
  margin: 6px 0 0;
  color: #b91c1c;
  font-size: 12px;
}

.form-control.is-invalid {
  border-color: #f87171;
  background: #fff5f5;
}

.form-control.is-invalid:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
