/* File: static/css/custom.css */
/* Custom theme colors and utilities for UFN2 */

:root {
  /* Custom gray palette */
  --ufn-gray-50: #edeae3;
  --ufn-gray-100: #d1cfc7;
  --ufn-gray-200: #a7a69f;
  --ufn-gray-300: #7d7c76;
  --ufn-gray-400: #6b6962;
  --ufn-gray-500: #55544f;
  --ufn-gray-600: #403e3b;
  --ufn-gray-700: #2b2927;
  --ufn-gray-800: #1c1a17;
  --ufn-gray-900: #0f0d0a;
}

/* ===== Background colors ===== */
.bg-ufn-900 {
  background-color: var(--ufn-gray-900) !important;
}
.bg-ufn-800 {
  background-color: var(--ufn-gray-800) !important;
}
.bg-ufn-700 {
  background-color: var(--ufn-gray-700) !important;
}
.bg-ufn-600 {
  background-color: var(--ufn-gray-600) !important;
}
.bg-ufn-500 {
  background-color: var(--ufn-gray-500) !important;
}
.bg-ufn-400 {
  background-color: var(--ufn-gray-400) !important;
}
.bg-ufn-50 {
  background-color: var(--ufn-gray-50) !important;
}

.bg-card {
  background-color: var(--ufn-gray-800);
}
.bg-ufn-900-40 {
  background-color: rgba(15, 13, 10, 0.4);
}
.bg-ufn-900-20 {
  background-color: rgba(15, 13, 10, 0.2);
}

/* ===== Text colors ===== */
.text-ufn-50 {
  color: var(--ufn-gray-50) !important;
}
.text-ufn-100 {
  color: var(--ufn-gray-100) !important;
}
.text-ufn-200 {
  color: var(--ufn-gray-200) !important;
}
.text-ufn-300 {
  color: var(--ufn-gray-300) !important;
}
.text-ufn-400 {
  color: var(--ufn-gray-400) !important;
}
.text-ufn-500 {
  color: var(--ufn-gray-500) !important;
}
.text-ufn-600 {
  color: var(--ufn-gray-600) !important;
}
.text-ufn-700 {
  color: var(--ufn-gray-700) !important;
}

/* ===== Border colors ===== */
.border-ufn-700 {
  border-color: var(--ufn-gray-700) !important;
}
.border-ufn-800 {
  border-color: var(--ufn-gray-800) !important;
}
.border-ufn-300 {
  border-color: var(--ufn-gray-300) !important;
}

/* ===== Form controls (dark theme) ===== */
.form-control-dark,
.form-select-dark {
  background-color: var(--ufn-gray-800);
  border-color: var(--ufn-gray-700);
  color: var(--ufn-gray-200);
}
.form-control-dark:focus,
.form-select-dark:focus {
  background-color: var(--ufn-gray-800);
  border-color: var(--ufn-gray-500);
  color: var(--ufn-gray-200);
  box-shadow: 0 0 0 0.2rem rgba(85, 84, 79, 0.5);
}
.form-control-dark::placeholder {
  color: var(--ufn-gray-500);
}

/* ===== Layout utilities ===== */
.max-w-md {
  max-width: 28rem;
}
.max-w-648 {
  max-width: 648px;
}
.max-w-900 {
  max-width: 900px;
}
.max-w-1200 {
  max-width: 1200px;
}
.min-vh-main {
  min-height: calc(100vh - 4rem);
}

/* ===== Custom spacing ===== */
.mb-72 {
  margin-bottom: 72px;
}
.mb-108 {
  margin-bottom: 108px;
}
.mb-28 {
  margin-bottom: 28px;
}
.mb-40 {
  margin-bottom: 40px;
}
.gap-28 {
  gap: 28px;
}
.gap-40 {
  gap: 40px;
}
.gap-16 {
  gap: 16px;
}

/* ===== Button variants ===== */
.btn-ufn-primary {
  background-color: var(--ufn-gray-700);
  color: #fff;
  font-weight: 700;
  border: none;
}
.btn-ufn-primary:hover {
  background-color: var(--ufn-gray-600);
  color: #fff;
}
.btn-ufn-dark {
  background-color: var(--ufn-gray-700);
  color: #fff;
  font-weight: 700;
}
.btn-ufn-dark:hover {
  background-color: var(--ufn-gray-600);
  color: #fff;
}
.btn-ufn-light {
  background-color: #000;
  color: #fff;
  font-weight: 700;
}
.btn-ufn-light:hover {
  background-color: var(--ufn-gray-800);
  color: #fff;
}
.btn-ufn-secondary {
  background-color: transparent;
  border: 1px solid var(--ufn-gray-700);
  color: var(--ufn-gray-200);
}
.btn-ufn-secondary:hover {
  border-color: var(--ufn-gray-500);
  color: var(--ufn-gray-200);
}

/* ===== Tag styles ===== */
.badge-ufn {
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  background-color: var(--ufn-gray-700);
  color: var(--ufn-gray-300);
  font-weight: 500;
  font-size: 0.75rem;
  font-family: sans-serif;
}
.badge-ufn-alt {
  padding: 0.25rem 0.5rem;
  background-color: var(--ufn-gray-800);
  color: var(--ufn-gray-300);
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

/* ===== Empty state ===== */
.empty-state {
  border-radius: 1rem;
  border: 1px dashed var(--ufn-gray-700);
  padding: 0.75rem 1rem 1.5rem;
  color: var(--ufn-gray-400);
  font-style: italic;
}
.empty-state-editor {
  border-radius: 0.75rem;
  border: 1px dashed var(--ufn-gray-800);
  background-color: rgba(15, 13, 10, 0.2);
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--ufn-gray-400);
}
.empty-state-light {
  border-radius: 0.5rem;
  border: 1px dashed #d1d5db;
  background-color: #fff;
  padding: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}
.empty-state-light-editor {
  border-radius: 0.5rem;
  border: 1px dashed #d1d5db;
  background-color: #f9fafb;
  padding: 0.75rem;
  font-size: 0.75rem;
  color: #6b7280;
}

/* ===== Profile section ===== */
.profile-static * {
  font-family: "Baskervville", serif;
}
.int-link {
  color: var(--ufn-gray-50);
  text-decoration: none;
}
.int-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* ===== Profile card ===== */
.profile-card-avatar-placeholder {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background-color: var(--ufn-gray-600);
}

/* ===== Section header ===== */
.section-header-number {
  font-size: 1rem;
  font-style: italic;
  color: var(--ufn-gray-400);
  letter-spacing: -0.025em;
  line-height: 1.5rem;
}
.section-header-title {
  font-size: 1rem;
  color: var(--ufn-gray-200);
  line-height: 1.25rem;
  font-style: italic;
}

/* ===== Navigation / Command palette ===== */
.modal-backdrop-custom {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: black;
}
.palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: column;
}
.palette-trigger {
  display: flex;
  flex-direction: row;
}
.palette-menu {
  display: none;
}
.palette-menu.show {
  display: block;
}
.clippy-dropdown-menu {
  display: none;
}
.clippy-dropdown-menu.show {
  display: block;
}

/* ===== Project card ===== */
.project-image-wrapper {
  aspect-ratio: 5/6;
  overflow: hidden;
  position: relative;
}
.project-tag {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  background-color: var(--ufn-gray-700);
  color: var(--ufn-gray-300);
  border-radius: 0.25rem;
}

/* ===== Recommendation card ===== */
.rec-photo {
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.2s;
}
.rec-photo:hover {
  transform: scale(1.05);
}

/* ===== Aspect ratio helpers ===== */
.aspect-video {
  aspect-ratio: 16/9;
}
.aspect-square {
  aspect-ratio: 1/1;
}
.aspect-5-6 {
  aspect-ratio: 5/6;
}
.aspect-10-7 {
  aspect-ratio: 10/7;
}
.aspect-3-4 {
  aspect-ratio: 3/4;
}

/* ===== Scroll margin ===== */
.scroll-mt-20 {
  scroll-margin-top: 5rem;
}

/* ===== Object fit ===== */
.object-cover {
  object-fit: cover;
}
.object-contain {
  object-fit: contain;
}

/* ===== Tracking / letter-spacing ===== */
.tracking-wide-2 {
  letter-spacing: 0.2em;
}

/* ===== Misc ===== */
.cursor-pointer {
  cursor: pointer;
}
.select-none {
  user-select: none;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.no-underline {
  text-decoration: none !important;
}
.underline-offset-2 {
  text-underline-offset: 2px;
}

/* ===== DropZone styling ===== */
.dropzone-area {
  border: 2px dashed var(--ufn-gray-600);
  border-radius: 0.375rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s;
}
.dropzone-area:hover,
.dropzone-area.active {
  background-color: var(--ufn-gray-200);
}
.dropzone-preview {
  margin-top: 1rem;
  min-height: 52px;
}

/* ===== Custom toggle switch ===== */
.ufn-switch {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
}
.ufn-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.ufn-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--ufn-gray-500);
  border-radius: 1.5rem;
  transition: 0.2s;
}
.ufn-switch-slider::before {
  content: "";
  position: absolute;
  height: 1.25rem;
  width: 1.25rem;
  left: 2px;
  bottom: 2px;
  background-color: #fff;
  border-radius: 50%;
  transition: 0.2s;
}
.ufn-switch input:checked + .ufn-switch-slider {
  background-color: var(--ufn-gray-200);
}
.ufn-switch input:checked + .ufn-switch-slider::before {
  transform: translateX(1.25rem);
}

/* ===== Responsive adjustments ===== */
@media (min-width: 576px) {
  .mb-sm-108 {
    margin-bottom: 108px;
  }
  .mb-sm-40 {
    margin-bottom: 40px;
  }
}

/* ===== Banner ===== */
.ufn-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--ufn-gray-800);
  padding: 0.625rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  margin-bottom: 2.75rem;
}

/* ===== Editor form fields ===== */
.editor-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ufn-gray-400);
}
.editor-input {
  margin-top: 0.5rem;
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--ufn-gray-800);
  background-color: rgba(15, 13, 10, 0.4);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--ufn-gray-100);
}
.editor-input:focus {
  border-color: var(--ufn-gray-600);
  outline: none;
  box-shadow: 0 0 0 0.15rem rgba(85, 84, 79, 0.3);
}

/* ===== Editor cards ===== */
.editor-card {
  border-radius: 0.75rem;
  border: 1px solid var(--ufn-gray-800);
  background-color: rgba(15, 13, 10, 0.3);
  padding: 1rem;
}

/* ===== Pill button ===== */
.btn-pill {
  border-radius: 9999px;
}

/* ===== Version status badges ===== */
.status-idea {
  background-color: #f3f4f6;
  color: #1f2937;
}
.status-voting {
  background-color: #dbeafe;
  color: #1e40af;
}
.status-building {
  background-color: #fef3c7;
  color: #92400e;
}
.status-launched {
  background-color: #d1fae5;
  color: #065f46;
}
.status-failed {
  background-color: #fee2e2;
  color: #991b1b;
}
.status-success {
  background-color: #ede9fe;
  color: #5b21b6;
}

/* ===== Alert variants (dark theme) ===== */
.alert-success-dark {
  background-color: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.6);
  color: #86efac;
  border-radius: 0.375rem;
}
.alert-danger-dark {
  background-color: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  border-radius: 0.375rem;
}

/* ===== Dirty indicator ===== */
.dirty-indicator {
  font-size: 0.75rem;
  color: #fbbf24;
}
.dirty-indicator-light {
  font-size: 0.75rem;
  color: #d97706;
  background-color: #fffbeb;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}
