@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

body {
  font-family: "Inter", sans-serif;
}
.gradient-text {
  background: linear-gradient(90deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.active-nav {
  color: hsl(0 0% 10%);
  background-color: hsl(42 20% 94%);
}
.sentiment-buy {
  background-color: rgba(34, 197, 94, 0.2);
  color: rgb(34, 197, 94);
}
.sentiment-sell {
  background-color: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
}
.sentiment-hold {
  background-color: rgba(234, 179, 8, 0.2);
  color: rgb(234, 179, 8);
}

/* Custom scrollbar for the sidebar */
.sidebar-scroll::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: hsl(0 0% 30%);
  border-radius: 2px;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: hsl(0 0% 40%);
}
input {
  font-size: 16px;
}
@media screen and (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

.card-hover {
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.recipe-image-placeholder {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.status-published {
  background-color: rgba(34, 197, 94, 0.2);
  color: rgb(34, 197, 94);
}
.status-draft {
  background-color: rgba(234, 179, 8, 0.2);
  color: rgb(234, 179, 8);
}
.status-pending {
  background-color: rgba(249, 115, 22, 0.2);
  color: rgb(249, 115, 22);
}
.status-rejected {
  background-color: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
}
.status-approved {
  background-color: rgba(34, 197, 94, 0.2);
  color: rgb(34, 197, 94);
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.permission-group {
  border-left: 3px solid #e67e22;
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.permission-group h4 {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #e67e22;
}

.permission-checkbox {
  margin-bottom: 0.5rem;
}

.permission-checkbox label {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.permission-checkbox input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 1rem;
  height: 1rem;
}

.permission-description {
  font-size: 0.75rem;
  color: #6b7280;
  margin-left: 1.5rem;
}

.tab-active {
  border-bottom: 2px solid #e67e22;
  color: #e67e22;
}

.tab-inactive {
  color: #6b7280;
  border-bottom: 2px solid transparent;
}

.tab-inactive:hover {
  border-bottom-color: #e67e22;
  color: #374151;
}

/* create recipe*/
.ingredient-row {
  transition: all 0.2s ease;
}
.ingredient-row:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.step-card {
  transition: all 0.2s ease;
}
.step-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.drag-handle {
  cursor: move;
}
.drag-handle:hover {
  color: #e67e22;
}
.sortable-ghost {
  opacity: 0.4;
  background-color: #f0f0f0;
}
.media-preview {
  position: relative;
  transition: all 0.2s ease;
}
.media-preview:hover {
  transform: scale(1.05);
}
.version-timeline-item {
  transition: all 0.2s ease;
}
.version-timeline-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.step-description {
  font-size: 14px;
  line-height: 1.5;
}

.step-description p {
  margin-bottom: 0.5rem;
}

.step-description ul,
.step-description ol {
  margin-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.step-description ul {
  list-style-type: disc;
}

.step-description ol {
  list-style-type: decimal;
}

.step-description li {
  margin-bottom: 0.25rem;
}

.step-description h1 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0.75rem 0 0.5rem;
}

.step-description h2 {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0.5rem 0 0.35rem;
}

.step-description h3 {
  font-size: 1rem;
  font-weight: bold;
  margin: 0.5rem 0 0.25rem;
}

.step-description strong {
  font-weight: bold;
  color: #1f2937;
}

.step-description em {
  font-style: italic;
}

.step-description a {
  color: #e45d50;
  text-decoration: underline;
}

.step-description blockquote {
  border-left: 2px solid #e5e7eb;
  padding-left: 0.75rem;
  margin: 0.5rem 0;
  color: #6b7280;
}

.step-description code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 9px;
}

.step-description pre {
  background-color: #f3f4f6;
  padding: 0.5rem;
  border-radius: 0.25rem;
  overflow-x: auto;
  font-family: monospace;
  font-size: 9px;
  margin: 0.5rem 0;
}

.step-description img {
  max-width: 100%;
  height: auto;
  margin: 0.5rem 0;
  border-radius: 0.25rem;
}

.step-description table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5rem 0;
}

.step-description th,
.step-description td {
  border: 1px solid #e5e7eb;
  padding: 0.25rem 0.5rem;
  text-align: left;
}

.step-description th {
  background-color: #f9fafb;
  font-weight: bold;
}

.step-description sup {
  vertical-align: super;
  font-size: 0.75em;
  line-height: 1;
}

.step-description sub {
  vertical-align: sub;
  font-size: 0.75em;
  line-height: 1;
}

.checkbox-wrapper-15 .cbx {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.checkbox-wrapper-15 .cbx span {
  display: inline-block;
  vertical-align: middle;
  font-size: 12px;
  transform: translate3d(0, 0, 0);
}
.checkbox-wrapper-15 .cbx span:first-child {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 17%;
  transform: scale(1);
  vertical-align: middle;
  border: 1px solid rgb(195, 185, 184);
  transition: all 0.2s ease;
}
.checkbox-wrapper-15 .cbx span:first-child svg {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 6px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 16px;
  stroke-dashoffset: 16px;
  transition: all 0.3s ease;
  transition-delay: 0.1s;
  transform: translate3d(0, 0, 0);
}
.checkbox-wrapper-15 .cbx span:first-child:before {
  content: "";
  width: 100%;
  height: 100%;
  background: #e35b4f;
  display: block;
  transform: scale(0);
  opacity: 1;
  border-radius: 17%;
  transition-delay: 0.2s;
}

.checkbox-wrapper-15 .cbx span:last-child:after {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  height: 1px;
  width: 100%;
  background: #b9b8c3;
  transform-origin: 0 0;
  transform: scaleX(0);
}
.checkbox-wrapper-15 .cbx:hover span:first-child {
  border-color: #e35b4f;
}

.checkbox-wrapper-15 .inp-cbx:checked + .cbx span:first-child {
  border-color: #e35b4f;
  background: #e35b4f;
  animation: check-15 0.6s ease;
}
.checkbox-wrapper-15 .inp-cbx:checked + .cbx span:first-child svg {
  stroke-dashoffset: 0;
}
.checkbox-wrapper-15 .inp-cbx:checked + .cbx span:first-child:before {
  transform: scale(2.2);
  opacity: 0;
  transition: all 0.6s ease;
}
.checkbox-wrapper-15 .inp-cbx:not(:checked) + .cbx span:last-child {
  color: #b9b8c3;
  transition: all 0.3s ease;
}
.checkbox-wrapper-15 .inp-cbx:not(:checked) + .cbx span:last-child:after {
  transform: scaleX(1);
  transition: all 0.3s ease;
  background: black;
}

@keyframes check-15 {
  50% {
    transform: scale(1.2);
  }
}

/* Ingredients Page */
.ingredient-card {
  transition: all 0.3s ease;
}
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #e0e7ff;
  color: #3730a3;
}
.unit-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #fef3c7;
  color: #92400e;
}

/* Recipes page */
.recipe-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  cursor: pointer;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.02);
}

.recipe-image-container {
  position: relative;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.recipe-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.recipe-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: white;
}

.recipe-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.recipe-title a {
  color: white;
  text-decoration: none;
}

.recipe-title a:hover {
  text-decoration: underline;
}

.chef-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.chef-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e35b4f 0%, #e35b4f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chef-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.recipe-meta {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.recipe-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-badge-feed {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

.fab-filters {
  position: fixed;
  bottom: 75px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 28px;
  background: linear-gradient(135deg, #e35b4f 0%, #e35b4f 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  z-index: 40;
  border: none;
}

.fab-filters:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.filter-modal {
  background: white;
  border-radius: 24px 24px 0 0;
  max-width: 500px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.active .filter-modal {
  transform: translateY(0);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.close-modal {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.close-modal:hover {
  background: #e5e7eb;
}

.modal-body {
  padding: 20px;
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
}

.filter-group input,
.filter-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #e35b4f;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.tags-list,
.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag-chip,
.category-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  background: #f3f4f6;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.tag-chip.active,
.category-chip.active {
  background: #e35b4f;
  color: white;
}

.tag-chip:hover:not(.active),
.category-chip:hover:not(.active) {
  background: #e5e7eb;
}

.modal-footer {
  padding: 16px 20px 32px;
  display: flex;
  gap: 12px;
  border-top: 1px solid #e5e7eb;
}

.btn-reset {
  flex: 1;
  padding: 12px;
  border-radius: 40px;
  font-weight: 500;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
}

.btn-apply {
  flex: 2;
  padding: 12px;
  border-radius: 40px;
  font-weight: 500;
  background: #e35b4f;
  color: white;
  border: none;
  cursor: pointer;
}

.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f4f6;
  border-top-color: #e35b4f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.no-more {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
  font-size: 0.875rem;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: 16px;
}

.empty-state i {
  font-size: 64px;
  color: #d1d5db;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  color: #6b7280;
  margin-bottom: 20px;
}

.feed-header {
  text-align: center;
  padding: 20px 16px 8px;
  max-width: 800px;
  margin: 0 auto;
}

.feed-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.feed-header p {
  color: #6b7280;
  font-size: 0.875rem;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px auto 12px;
  max-width: 800px;
  padding: 0 16px;
}

.filter-pill {
  background: #f3f4f6;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-pill i {
  cursor: pointer;
  font-size: 10px;
}

.filter-pill i:hover {
  color: #e35b4f;
}
/* Tags Page */
.tag-card {
  transition: all 0.3s ease;
}
.tag-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.tag-dietary {
  border-left: 4px solid #10b981;
}
.tag-allergen {
  border-left: 4px solid #ef4444;
}
.tag-tag {
  border-left: 4px solid #3b82f6;
}
.tag-category {
  border-left: 4px solid #8b5cf6;
}
.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}
.tag-badge-dietary {
  background-color: #d1fae5;
  color: #065f46;
}
.tag-badge-allergen {
  background-color: #fee2e2;
  color: #991b1b;
}
.tag-badge-category {
  background-color: #ede9fe;
  color: #5b21b6;
}
.tag-badge-tag {
  background-color: #dbeafe;
  color: #1e40af;
}

/* Users Page */
.tab-active {
  border-bottom: 2px solid hsl(5 73% 50%);
  color: hsl(5 73% 50%);
}
.tab-inactive {
  border-bottom: 2px solid transparent;
  color: #6b7280;
}
.tab-inactive:hover {
  border-bottom: 2px solid #e5e7eb;
  color: #374151;
}
.user-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.user-status-active {
  background-color: rgba(34, 197, 94, 0.2);
  color: rgb(34, 197, 94);
}
.user-status-inactive {
  background-color: rgba(239, 68, 68, 0.2);
  color: rgb(239, 68, 68);
}
.user-status-pending {
  background-color: rgba(249, 115, 22, 0.2);
  color: rgb(249, 115, 22);
}
.user-status-expired {
  background-color: rgba(107, 114, 128, 0.2);
  color: rgb(107, 114, 128);
}

/* View Recipe Page */
.step-card {
  transition: all 0.2s ease;
}
.step-card:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.step-nav-active {
  background-color: hsl(5 73% 50%);
  color: white;
}
.scale-input {
  width: 100px;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}
.toast-success {
  background-color: #10b981;
}
.toast-error {
  background-color: #ef4444;
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.modal {
  transition: opacity 0.3s ease;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Index page */
.brand-loader {
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(10px);
  animation: brandIn 2.2s ease forwards;
}

.logo-loader {
  width: 120px;
  color: white;
}

.brand-text {
  display: flex;
  flex-direction: column;
  margin-left: 12px;
}

.login-btn {
  margin-top: 25px;
  padding: 8px 16px;
  font-size: 18px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;

  opacity: 0;
  transform: translateX(-10px);

  backdrop-filter: blur(6px);

  transition: all 0.3s ease;

  animation: btnIn 0.7s ease forwards;
  animation-delay: 2.2s; /* 👈 AFTER title */
}

@keyframes btnIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

.login-btn:hover {
  background: white;
  color: #7d7773;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.15);
}

/* Initial state */
.logo-path {
  fill: transparent;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;

  stroke-dasharray: 1000; /* placeholder, replace with real length */
  stroke-dashoffset: 1000;

  opacity: 0;

  animation:
    drawLogo 2s cubic-bezier(0.65, 0, 0.35, 1) forwards,
    fillLogo 0.9s ease forwards;

  animation-delay: 0.2s, 1.3s;
}

.title {
  opacity: 0;
  transform: translateY(10px);
  animation: titleIn 0.8s ease forwards;
  animation-delay: 1.6s; /* 👈 sync point */
}

/* Smooth draw, no pauses */
@keyframes drawLogo {
  0% {
    stroke-dashoffset: 1000;
    opacity: 0;
  }
  5% {
    opacity: 1; /* prevents flash */
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* Fill appears after drawing */
@keyframes fillLogo {
  0% {
    fill: transparent;
  }
  100% {
    fill: #ffffff;
    stroke: transparent;
  }
}

@keyframes titleIn {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes brandIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(6px);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}
