/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *



 */

 .badge {
    --tw-bg-opacity: 1;
    background-color: rgba(226, 226, 213, var(--tw-bg-opacity));
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1rem;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    padding: 0.5rem;
    position: relative;
    --tw-text-opacity: 1;
    color: black;
    text-transform: uppercase;
    float: left;
}


.badge-overflow {
  --tw-bg-opacity: 1;
  background-color: rgba(226, 226, 213, var(--tw-bg-opacity));
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1rem;
  margin-top: 0.5rem;
  margin-left: 0.5rem;
  padding: 0.5rem;
  position: absolute;
  top: 0px;
  --tw-text-opacity: 1;
  color: black;
  text-transform: uppercase;
}

.badge-overflow-pin {
  --tw-bg-opacity: 1;
  background-color: rgba(226, 226, 213, var(--tw-bg-opacity));
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1rem;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
  padding: 0.5rem;
  position: absolute;
  top: 0px;
  right: 0px;
  --tw-text-opacity: 1;
  color: black;
  text-transform: uppercase;
}

img[data-fancybox] {
  cursor: zoom-in;
}

.fancybox__container {
  --fancybox-bg: rgba(193, 201, 210, 0.7);
}

.fancybox-zoomOut {
  animation: 0.2s ease-in-out fancybox-zoomOut both;
}

.fancybox-zoomIn {
  animation: 0.25s ease-in-out fancybox-zoomIn both;
}

@keyframes fancybox-zoomIn {
  from {
    opacity: 0;
    transform: scale3d(0.8, 0.8, 0.8);
  }

  100% {
    opacity: 1;
  }
}

@keyframes fancybox-zoomOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    transform: scale3d(0.8, 0.8, 0.8);
  }
}

.strike{
  text-decoration: line-through;
  opacity: 0.6; /* Real browsers */
  filter: alpha(opacity = 60); /* MSIE */
  white-space: normal;
  overflow: visible;
  text-overflow: ellipsis;
}

@media print {
  body{
    padding: 10px;
  }
  .shadow {box-shadow: none;
  }
}

.st-accordion .st-accordion__icon:before
{content:"▼";display:inline-block;font-size:80%;margin-right:5px;text-decoration:none;transform:rotate(-90deg)}

.st-accordion .st-accordion__icon--opened:before{transform:rotate(0deg)}
.st-accordion .st-accordion__content:not(.st-accordion__content--visible){height:0;opacity:0;overflow:hidden;transition:all .2s;visibility:hidden}
.st-accordion .st-accordion__content.st-accordion__content--visible{opacity:1;overflow:hidden;transition:all .2s;visibility:visible}

.aa-Autocomplete{
  min-width: 200px;
}

/* Override Algolia autocomplete input green background */
.aa-Input {
  background-color: #ffffff !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.5rem !important;
}

.aa-Input:focus {
  border-color: #4a7c59 !important;
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.2) !important;
}

/* total width */
.scrollbar::-webkit-scrollbar {
  width:16px
}

/* scrollbar itself */
.scrollbar::-webkit-scrollbar-thumb {
  background-color:#4E9573;
  border-radius:16px;
}

/* set button(top and bottom of the scrollbar) */
.scrollbar::-webkit-scrollbar-button {display:none}

/* Recipe Form Enhancements */
.step-panel {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth transitions for form elements */
input:focus, textarea:focus, select:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* File input styling */
input[type="file"]::-webkit-file-upload-button {
  transition: all 0.2s ease-in-out;
}

input[type="file"]::-webkit-file-upload-button:hover {
  transform: translateY(-1px);
}



/* Nested form animations */
.nested-form-wrapper {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Button hover effects */
button {
  transition: all 0.2s ease-in-out;
}

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

button:active {
  transform: translateY(0);
}

/* Custom scrollbar for textareas */
textarea::-webkit-scrollbar {
  width: 8px;
}

textarea::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Step Group Accordion Styles */
.accordion-content {
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.accordion-content.hidden {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.accordion-content:not(.hidden) {
  max-height: none;
  opacity: 1;
}

/* Accordion icon rotation */
[data-accordion-target="icon"] svg {
  transition: transform 0.3s ease-in-out;
}

/* Step group header hover effect */
.cursor-pointer:hover {
  background-color: rgba(243, 244, 246, 0.8);
}

/* Custom Searchable Dropdown Styles */
.recipe-option {
  transition: background-color 0.15s ease-in-out;
}

.recipe-option:hover {
  background-color: #dbeafe !important;
  color: #1e40af;
}

.recipe-option:last-child {
  border-bottom: none !important;
}

/* Dropdown animation */
[data-link-target="options"] {
  animation: dropdownFadeIn 0.15s ease-out;
  transform-origin: top;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: scaleY(0.95) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scaleY(1) translateY(0);
  }
}

/* Search input focus state */
[data-link-target="search"]:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Custom scrollbar for dropdown */
[data-link-target="options"]::-webkit-scrollbar {
  width: 8px;
}

[data-link-target="options"]::-webkit-scrollbar-track {
  background: #f8fafc;
}

[data-link-target="options"]::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

[data-link-target="options"]::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Recipe Import Modal */
.recipe-import-modal {
  transition: opacity 0.25s ease-out;
}

.recipe-import-modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.recipe-import-modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.recipe-import-modal .modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Import button gradient animation */
.import-button-container button {
  position: relative;
  overflow: hidden;
}


.import-button-container button:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.import-button-container button:hover:before {
  left: 100%;
}

/* Section Navigation Styles */
.section-nav-sidebar {
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.95);
}

.nav-link {
  transition: all 0.2s ease-in-out;
}

.nav-link:hover {
  transform: translateX(2px);
}

.nav-link.active {
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

/* Ensure smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* Add some padding to the main content to account for fixed sidebar on large screens */
@media (min-width: 1024px) {
  .recipe-form-container {
    margin-left: 1rem;
  }
}

/* Hide navigation on smaller screens to avoid clutter */
@media (max-width: 1023px) {
  .section-nav-sidebar {
    display: none !important;
  }
}

/* Custom Form UX Enhancements */

/* Smooth focus transitions for all form inputs */
input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  transition: all 0.2s ease-in-out;
}

/* Enhanced focus states */
input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Form validation styles - excluding checkboxes and radio buttons */
input:not([type="checkbox"]):not([type="radio"]):invalid:not(:focus):not(:placeholder-shown) {
  border-color: #ef4444;
  background-color: #fef2f2;
}



/* Hover effects for buttons */
button:hover {
  transform: translateY(-1px);
}

/* Loading states */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

/* Tooltip styles */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #374151;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 14px;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #374151 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Enhanced section headers */
.section-header {
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

/* Improved file upload area */
.file-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.file-upload-area:hover {
  border-color: #3b82f6;
  background-color: #f8fafc;
}

.file-upload-area.dragover {
  border-color: #3b82f6;
  background-color: #eff6ff;
  transform: scale(1.02);
}

/* Character counter styling */
.char-counter {
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.char-counter.warning {
  color: #f59e0b;
}

.char-counter.danger {
  color: #ef4444;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  input, select, textarea {
    border-width: 2px;
  }
  
  button {
    border: 2px solid;
  }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .section-nav-sidebar {
    display: none !important;
  }
  
  input, select, textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Print styles */
@media print {
  .section-nav-sidebar,
  button:not([type="submit"]) {
    display: none !important;
  }
}

/* Print dialog */
.rp-print-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.rp-print-opt { cursor: pointer; }
.rp-print-opt input { display: none; }
.rp-print-opt-box { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 2px solid #4E9573; border-radius: 10px; font-size: 0.88rem; font-weight: 600; color: #1a2b1a; background: #f0faf5; transition: all 0.15s; }
.rp-print-opt-box i { color: #4E9573; width: 16px; text-align: center; }
.rp-print-opt-off .rp-print-opt-box { border-color: #ddd; background: #fafafa; color: #aaa; }
.rp-print-opt-off .rp-print-opt-box i { color: #ccc; }

@media print {
  .swal2-container, .swal2-backdrop-show { display: none !important; }
}

/* Print panel */
.rp-print-panel { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; align-items: center; justify-content: center; }
.rp-print-panel.rp-print-panel-open { display: flex; }
.rp-print-panel-inner { background: white; border-radius: 16px; padding: 28px; max-width: 480px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.rp-print-panel-title { font-size: 1.1rem; font-weight: 800; color: #1a2b1a; margin: 0 0 20px; }
.rp-print-panel-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.rp-print-panel-cancel { padding: 9px 20px; border: 1.5px solid #ddd; border-radius: 8px; background: white; font-size: 0.88rem; font-weight: 600; cursor: pointer; color: #555; }
.rp-print-panel-cancel:hover { border-color: #aaa; }
.rp-print-panel-confirm { padding: 9px 20px; background: #4E9573; color: white; border: none; border-radius: 8px; font-size: 0.88rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.rp-print-panel-confirm:hover { background: #3d7a5c; }
@media print { .rp-print-panel { display: none !important; } }

/* Ingredient search box */
.home-ing-search-wrap { position: relative; max-width: 580px; margin: 0 auto 24px; display: flex; align-items: center; background: white; border: 2px solid #e0e0e0; border-radius: 16px; padding: 6px 6px 6px 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.07); transition: border-color 0.15s, box-shadow 0.15s; }
.home-ing-search-wrap:focus-within { border-color: #4E9573; box-shadow: 0 4px 24px rgba(78,149,115,0.15); }
.home-ing-search-icon { color: #4E9573; font-size: 1rem; margin-right: 10px; flex-shrink: 0; }
.home-ing-search-input { flex: 1; border: none; outline: none; font-size: 1rem; color: #111; background: transparent; padding: 10px 8px; }
.home-ing-search-input::placeholder { color: #aaa; }
.home-ing-search-btn { flex-shrink: 0; background: #4E9573; color: white; border: none; border-radius: 10px; padding: 10px 20px; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.home-ing-search-btn:hover { background: #3d7a5c; }

/* ── ACCESSIBILITY SETTINGS (global effect classes on <html>) ──────────── */

/* Text size — skalar rem-baserad text, layout påverkas inte */
html.a11y-text-sm  { font-size: 88%; }
html.a11y-text-lg  { font-size: 112.5%; }
html.a11y-text-xl  { font-size: 125%; }
html.a11y-text-xxl { font-size: 150%; }

/* ─── DARK MODE — täcker hela sidan ───────────────────────────────── */

/* Base */
html.a11y-high-contrast {
  background: #111 !important;
  color-scheme: dark;
}
html.a11y-high-contrast body,
html.a11y-high-contrast main { background: #111 !important; color: #e0e0e0 !important; }

/* Headings globally */
html.a11y-high-contrast h1,
html.a11y-high-contrast h2,
html.a11y-high-contrast h3,
html.a11y-high-contrast h4,
html.a11y-high-contrast h5 { color: #f2f2f2 !important; }
html.a11y-high-contrast p { color: #ccc !important; }

/* Navigation bar */
html.a11y-high-contrast nav,
html.a11y-high-contrast .bg-slate-50,
html.a11y-high-contrast .z-10 { background-color: #181818 !important; box-shadow: 0 1px 0 #2e2e2e !important; }
html.a11y-high-contrast nav a,
html.a11y-high-contrast nav button { color: #d0d0d0 !important; }
html.a11y-high-contrast nav a:hover { background: #2a2a2a !important; color: #fff !important; }

/* Footer */
html.a11y-high-contrast footer { background: #181818 !important; border-color: #2a2a2a !important; }
html.a11y-high-contrast footer a,
html.a11y-high-contrast footer p,
html.a11y-high-contrast footer span:not([class*="fa"]) { color: #999 !important; }

/* Tailwind background utility overrides */
html.a11y-high-contrast [class*="bg-white"],
html.a11y-high-contrast [class*="bg-slate-50"],
html.a11y-high-contrast [class*="bg-neutral-100"],
html.a11y-high-contrast [class*="bg-gray-50"],
html.a11y-high-contrast [class*="bg-gray-100"],
html.a11y-high-contrast [class*="bg-green-50"],
html.a11y-high-contrast [class*="bg-zinc-50"] { background-color: #1c1c1c !important; }

/* Tailwind text overrides */
html.a11y-high-contrast [class*="text-gray-800"],
html.a11y-high-contrast [class*="text-gray-700"],
html.a11y-high-contrast [class*="text-gray-600"],
html.a11y-high-contrast [class*="text-black"],
html.a11y-high-contrast [class*="text-slate-"] { color: #d0d0d0 !important; }
html.a11y-high-contrast [class*="text-gray-400"],
html.a11y-high-contrast [class*="text-gray-300"],
html.a11y-high-contrast [class*="text-gray-500"] { color: #888 !important; }

/* Tailwind border overrides */
html.a11y-high-contrast [class*="border-gray-"],
html.a11y-high-contrast [class*="border-slate-"] { border-color: #333 !important; }

/* Inline style white backgrounds */
html.a11y-high-contrast [style*="background: white"],
html.a11y-high-contrast [style*="background:white"],
html.a11y-high-contrast [style*="background: #fff"],
html.a11y-high-contrast [style*="background:#fff"],
html.a11y-high-contrast [style*="background:#fafafa"],
html.a11y-high-contrast [style*="background: #fafafa"] { background: #1c1c1c !important; }

/* Inputs and search */
html.a11y-high-contrast input,
html.a11y-high-contrast textarea,
html.a11y-high-contrast select {
  background: #222 !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}
html.a11y-high-contrast input::placeholder,
html.a11y-high-contrast textarea::placeholder { color: #999 !important; }

/* Images — dim slightly, logo exempt */
html.a11y-high-contrast img { filter: brightness(0.82) !important; }
html.a11y-high-contrast img[alt*="Lagat"],
html.a11y-high-contrast img[alt*="logo"],
html.a11y-high-contrast img[alt*="Logo"] { filter: none !important; }

/* ── Recipe component ── */
html.a11y-high-contrast .rp { background: #111 !important; color: #e0e0e0 !important; }
html.a11y-high-contrast .rp h1,
html.a11y-high-contrast .rp h2,
html.a11y-high-contrast .rp h3,
html.a11y-high-contrast .rp h4 { color: #f2f2f2 !important; }
html.a11y-high-contrast .rp-bc a,
html.a11y-high-contrast .rp a { color: #6fcf97 !important; }
html.a11y-high-contrast .rp-ing-row,
html.a11y-high-contrast .rp-step { background: #1c1c1c !important; border-color: #2e2e2e !important; }
html.a11y-high-contrast .rp-ing-row:hover,
html.a11y-high-contrast .rp-step:hover { border-color: #4E9573 !important; }
html.a11y-high-contrast .rp-ing-name { color: #e0e0e0 !important; }
html.a11y-high-contrast .rp-step-text { color: #d0d0d0 !important; }
html.a11y-high-contrast .rp-step-num { color: #4E9573 !important; }
html.a11y-high-contrast .rp-ing-amount { background: #2a2a2a !important; color: #ccc !important; }
html.a11y-high-contrast .rp-stats,
html.a11y-high-contrast .rp-actions-row,
html.a11y-high-contrast .rp-stat-item { border-color: #2e2e2e !important; }
html.a11y-high-contrast .rp-stat-item .val,
html.a11y-high-contrast .rp-stat-item i { color: #d0d0d0 !important; }
html.a11y-high-contrast .rp-hero img { filter: brightness(0.82) !important; }
html.a11y-high-contrast .rp-serving-title { background: #1e2e24 !important; border-color: #2e4a38 !important; }
html.a11y-high-contrast .rp-tips-details { background: #161616 !important; border: 1px solid #2e2e2e !important; }
html.a11y-high-contrast .rp-tips-body p,
html.a11y-high-contrast .rp-tips-body li { color: #ccc !important; }
html.a11y-high-contrast .wl-label { color: #e0e0e0 !important; }

/* ── Tillgänglighetspanel i dark mode ── */
html.a11y-high-contrast .rp-a11y-btn { background: #1c1c1c !important; border-color: #333 !important; color: #e0e0e0 !important; }
html.a11y-high-contrast .rp-a11y-btn-label { color: #f0f0f0 !important; }
html.a11y-high-contrast .rp-a11y-btn-sub,
html.a11y-high-contrast .rp-a11y-tgl-sub { color: #9a9a9a !important; }
html.a11y-high-contrast .rp-a11y-btn-icon { background: #1e2e24 !important; }
html.a11y-high-contrast .rp-a11y-panel { background: #1a1a1a !important; border-color: #2e2e2e !important; box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important; }
html.a11y-high-contrast .rp-a11y-ph { border-color: #2e2e2e !important; }
html.a11y-high-contrast .rp-a11y-pt,
html.a11y-high-contrast .rp-a11y-sec-title { color: #999 !important; }
html.a11y-high-contrast .rp-a11y-sec { border-color: #2a2a2a !important; }
html.a11y-high-contrast .rp-a11y-size { background: #242424 !important; border-color: #333 !important; color: #ccc !important; }
html.a11y-high-contrast .rp-a11y-size[data-active="true"] { background: #1e2e24 !important; border-color: #4E9573 !important; }
html.a11y-high-contrast .rp-a11y-tgl-text { color: #d0d0d0 !important; }
html.a11y-high-contrast .rp-a11y-switch { background: #3a3a3a !important; }
html.a11y-high-contrast .rp-a11y-toggle[aria-checked="true"] .rp-a11y-switch { background: #4E9573 !important; }
html.a11y-high-contrast .rp-a11y-reset { background: #1e1e1e !important; border-color: #333 !important; color: #888 !important; }
html.a11y-high-contrast .rp-a11y-close { color: #777 !important; }
html.a11y-high-contrast .rp-a11y-close:hover { background: #2a2a2a !important; color: #ccc !important; }

/* ── Homepage kort ── */
html.a11y-high-contrast .feat-card { background: #1c1c1c !important; border-color: #2e2e2e !important; }
html.a11y-high-contrast .feat-title { color: #f0f0f0 !important; }
html.a11y-high-contrast .feat-desc { color: #aaa !important; }
html.a11y-high-contrast .feat-tag { background: #2a2a2a !important; color: #b0b0b0 !important; }

/* ── Recept-index & kategorisida ── */
html.a11y-high-contrast .ri-card,
html.a11y-high-contrast .cat-sub-card,
html.a11y-high-contrast .ri-cat-card { background: #1c1c1c !important; border-color: #2e2e2e !important; }
html.a11y-high-contrast .ri-card:hover,
html.a11y-high-contrast .cat-sub-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important; }
html.a11y-high-contrast .ri-card-title,
html.a11y-high-contrast .cat-sub-name,
html.a11y-high-contrast .ri-cat-card-name { color: #f0f0f0 !important; }
html.a11y-high-contrast .ri-card-time,
html.a11y-high-contrast .cat-sub-count,
html.a11y-high-contrast .ri-cat-card-count { color: #999 !important; }
html.a11y-high-contrast .ri-card-body { background: #1c1c1c !important; }
html.a11y-high-contrast .ri-hero,
html.a11y-high-contrast .cat-hero,
html.a11y-high-contrast .ri-hero-content { background: #1a2b1a !important; }
html.a11y-high-contrast .ri-time-chip,
html.a11y-high-contrast .ri-ing-chip { background: #1e1e1e !important; border-color: #333 !important; color: #ccc !important; }
html.a11y-high-contrast .ri-time-chip.active,
html.a11y-high-contrast .ri-ing-chip.active { background: #1e2e24 !important; border-color: #4E9573 !important; color: #6fcf97 !important; }
html.a11y-high-contrast .ri-section-title,
html.a11y-high-contrast .cat-hero-title { color: #f2f2f2 !important; }
html.a11y-high-contrast .ri-load-btn { background: #1e2e24 !important; }

/* ── Om-sidan ── */
html.a11y-high-contrast .ab-hero,
html.a11y-high-contrast .po-card { background: #1c1c1c !important; border-color: #2e2e2e !important; }
html.a11y-high-contrast .ab-name,
html.a11y-high-contrast .po-card-title { color: #f0f0f0 !important; }

/* ── Broad fallback — vita/ljusa bakgrunder på custom klasser ── */
html.a11y-high-contrast [class*="-card"]:not([class*="nd-"]):not([class*="hs-"]) { background: #1c1c1c !important; border-color: #2e2e2e !important; }
html.a11y-high-contrast [class*="-title"]:not([class*="nd-"]) { color: #f0f0f0 !important; }
html.a11y-high-contrast [class*="-desc"],
html.a11y-high-contrast [class*="-sub"]:not(button):not([class*="cm-"]):not([class*="hs-"]) { color: #aaa !important; }

/* ── Matlagningsläge i dark mode ── */
html.a11y-high-contrast .cm-overlay { background: #111 !important; }

/* Topbar: rubrik + framstegsrad */
html.a11y-high-contrast .cm-topbar { background: #181818 !important; }
html.a11y-high-contrast .cm-header { background: #181818 !important; border-color: #2a2a2a !important; }
html.a11y-high-contrast .cm-title { color: #f2f2f2 !important; }
html.a11y-high-contrast .cm-step-badge { color: #9a9a9a !important; }
html.a11y-high-contrast .cm-progress-bar { background: #2a2a2a !important; }
html.a11y-high-contrast .cm-font-btn { background: #2a2a2a !important; color: #ccc !important; }
html.a11y-high-contrast .cm-font-btn:hover { background: #383838 !important; }
html.a11y-high-contrast .cm-close { background: #2a2a2a !important; color: #bbb !important; }
html.a11y-high-contrast .cm-close:hover { background: #383838 !important; }

/* Kolumner */
html.a11y-high-contrast .cm-col { background: #141414 !important; border-color: #242424 !important; }
html.a11y-high-contrast .cm-ing-title { color: #f2f2f2 !important; }
html.a11y-high-contrast .cm-ing-count { color: #999 !important; }
html.a11y-high-contrast .cm-col-title { color: #4E9573 !important; }
html.a11y-high-contrast .cm-group-title { color: #f0f0f0 !important; }
html.a11y-high-contrast .cm-keyboard-hint { color: #999 !important; }
html.a11y-high-contrast kbd { background: #2a2a2a !important; border-color: #444 !important; color: #b0b0b0 !important; }

/* Portionsstyrning */
html.a11y-high-contrast .cm-portions-label-txt { color: #9a9a9a !important; }
html.a11y-high-contrast .cm-portions-btn { background: #222 !important; border-color: #3a3a3a !important; color: #aaa !important; }
html.a11y-high-contrast .cm-portions-btn:hover { border-color: #4E9573 !important; color: #4E9573 !important; }
html.a11y-high-contrast .cm-portions-val { color: #f0f0f0 !important; }
html.a11y-high-contrast .cm-portions-notice { background: #1a2e22 !important; color: #6fcf97 !important; }
html.a11y-high-contrast .cm-portions-reset-btn { background: #24382c !important; border-color: #4E9573 !important; color: #a8e6bd !important; }
html.a11y-high-contrast .cm-portions-reset-btn:hover { background: #2d4a38 !important; }
html.a11y-high-contrast .cm-portions-notice-close { background: #24382c !important; color: #a8e6bd !important; }
html.a11y-high-contrast .cm-portions-notice-close:hover { background: #2d4a38 !important; }

/* Rader — ingredienser & steg */
html.a11y-high-contrast .cm-row { background: #1c1c1c !important; border-color: #2a2a2a !important; }
html.a11y-high-contrast .cm-row:hover { border-color: #383838 !important; }
html.a11y-high-contrast .cm-row-text { color: #d8d8d8 !important; }
html.a11y-high-contrast .cm-row-amount { background: #252525 !important; color: #bbb !important; }
html.a11y-high-contrast .cm-step-num { color: #4E9573 !important; }

/* Kryssrutor */
html.a11y-high-contrast .cm-row input[type="checkbox"] { background: #1c1c1c !important; border-color: #444 !important; }
html.a11y-high-contrast .cm-row input[type="checkbox"]:checked { background: #4E9573 !important; border-color: #4E9573 !important; }

/* Avbockad rad */
/* Raderna dimmas redan med opacity 0.38 — ljusare grundfärg krävs för att synas */
html.a11y-high-contrast .cm-done .cm-row-text,
html.a11y-high-contrast .cm-done .cm-row-amount { color: #9a9a9a !important; opacity: 0.55 !important; }

/* Aktivt steg */
html.a11y-high-contrast .cm-active-step { background: #182819 !important; border-color: #4E9573 !important; box-shadow: 0 0 0 3px rgba(78,149,115,0.15) !important; }
html.a11y-high-contrast .cm-active-step .cm-step-num { color: #6fcf97 !important; }
html.a11y-high-contrast .cm-active-step .cm-row-text { color: #e8e8e8 !important; }

/* Line spacing */
html.a11y-line-spacing p,
html.a11y-line-spacing li,
html.a11y-line-spacing dd,
html.a11y-line-spacing dt { line-height: 2.0 !important; margin-bottom: 1.2em !important; }
html.a11y-line-spacing h1,
html.a11y-line-spacing h2,
html.a11y-line-spacing h3 { line-height: 1.5 !important; margin-bottom: 0.8em !important; }
html.a11y-line-spacing .rp-step-instruction { line-height: 2.1 !important; letter-spacing: 0.02em; }
html.a11y-line-spacing .rp-ing-row { padding: 12px 0 !important; }

/* Disable animations */
html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Readable font — hela sajten */
html.a11y-readable-font *:not(i):not([class^="fa-"]):not([class*=" fa-"]) {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
  letter-spacing: 0.03em;
  word-spacing: 0.06em;
}
html.a11y-readable-font h1,
html.a11y-readable-font h2,
html.a11y-readable-font h3 { letter-spacing: 0 !important; }

/* Enhanced focus indicators — user has opted in so show on ALL interactions (mouse + keyboard) */
html.a11y-focus-enhanced :focus,
html.a11y-focus-enhanced :focus-visible {
  outline: 3px solid #ff6600 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(255,102,0,0.18) !important;
  border-radius: 3px;
}
/* Explicitly re-declare for interactive elements that Tailwind/browsers suppress outline on */
html.a11y-focus-enhanced a:focus,
html.a11y-focus-enhanced a:focus-visible,
html.a11y-focus-enhanced button:focus,
html.a11y-focus-enhanced button:focus-visible,
html.a11y-focus-enhanced input:focus,
html.a11y-focus-enhanced input:focus-visible,
html.a11y-focus-enhanced textarea:focus,
html.a11y-focus-enhanced textarea:focus-visible,
html.a11y-focus-enhanced select:focus,
html.a11y-focus-enhanced select:focus-visible,
html.a11y-focus-enhanced [role="button"]:focus,
html.a11y-focus-enhanced [tabindex]:focus {
  outline: 3px solid #ff6600 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(255,102,0,0.18) !important;
  border-radius: 3px;
}
/****** Style Star Rating Widget *****/

.rating { 
  border: none;
  float: left;
}

.rating > input { display: none; } 
.rating > label:before { 
  margin: 5px;
  font-size: 1.5em;
  font-family: 'Font Awesome 5 Free', sans-serif;
  font-weight: 900;
  display: inline-block;
  content: "\f005";
}

.rating > .half:before { 
  content: "\f089";
  position: absolute;
}

.rating > label { 
  color: #ddd; 
 float: right; 
}

/***** CSS Magic to Highlight Stars on Hover *****/

.rating > input:checked ~ label, /* show gold star when clicked */
.rating:not(:checked) > label:hover, /* hover current star */
.rating:not(:checked) > label:hover ~ label { color: #FFD700;  } /* hover previous stars in list */

.rating > input:checked + label:hover, /* hover current star when changing rating */
.rating > input:checked ~ label:hover,
.rating > label:hover ~ input:checked ~ label, /* lighten current selection */
.rating > input:checked ~ label:hover ~ label { color: rgb(234 179 8);  } 


.rating2 { 
  border: none;
  float: left;
}

.rating2> input { display: none; } 
.rating2 > label:before { 
  margin: 5px;
  font-size: 1.5em;
  font-family: 'Font Awesome 5 Free', sans-serif;
  font-weight: 900;
  display: inline-block;
  content: "\f005";
}

.rating2 > .half:before { 
  content: "\f089";
  position: absolute;
}

.rating2 > label { 
  color: #ddd; 
 float: right; 
}

/***** CSS Magic to Highlight Stars on Hover *****/

.rating2 > input:checked ~ label, /* show gold star when clicked */
.rating2:not(:checked) > label:hover, /* hover current star */
.rating2:not(:checked) > label:hover ~ label { color: #FFD700;  } /* hover previous stars in list */

.rating2 > input:checked + label:hover, /* hover current star when changing rating */
.rating2 > input:checked ~ label:hover,
.rating2 > label:hover ~ input:checked ~ label, /* lighten current selection */
.rating2 > input:checked ~ label:hover ~ label { color: rgb(234 179 8);  } 
.resp-sharing-button__link,
.resp-sharing-button__icon {
  display: inline-block
}

.resp-sharing-button__link {
  text-decoration: none;
  color: #fff;
  margin: 0.5em
}

.resp-sharing-button {
  border-radius: 5px;
  transition: 25ms ease-out;
  padding: 0.5em 0.75em;
  font-family: Helvetica Neue,Helvetica,Arial,sans-serif
}

.resp-sharing-button__icon svg {
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  vertical-align: top
}

.resp-sharing-button--small svg {
  margin: 0;
  vertical-align: middle
}

/* Non solid icons get a stroke */
.resp-sharing-button__icon {
  stroke: #fff;
  fill: none
}

/* Solid icons get a fill */
.resp-sharing-button__icon--solid,
.resp-sharing-button__icon--solidcircle {
  fill: #fff;
  stroke: none
}

.resp-sharing-button--twitter {
  background-color: #55acee
}

.resp-sharing-button--twitter:hover {
  background-color: #2795e9
}

.resp-sharing-button--pinterest {
  background-color: #bd081c
}

.resp-sharing-button--pinterest:hover {
  background-color: #8c0615
}

.resp-sharing-button--facebook {
  background-color: #3b5998
}

.resp-sharing-button--facebook:hover {
  background-color: #2d4373
}

.resp-sharing-button--tumblr {
  background-color: #35465C
}

.resp-sharing-button--tumblr:hover {
  background-color: #222d3c
}

.resp-sharing-button--reddit {
  background-color: #5f99cf
}

.resp-sharing-button--reddit:hover {
  background-color: #3a80c1
}

.resp-sharing-button--google {
  background-color: #dd4b39
}

.resp-sharing-button--google:hover {
  background-color: #c23321
}

.resp-sharing-button--linkedin {
  background-color: #0077b5
}

.resp-sharing-button--linkedin:hover {
  background-color: #046293
}

.resp-sharing-button--email {
  background-color: #777
}

.resp-sharing-button--email:hover {
  background-color: #5e5e5e
}

.resp-sharing-button--xing {
  background-color: #1a7576
}

.resp-sharing-button--xing:hover {
  background-color: #114c4c
}

.resp-sharing-button--whatsapp {
  background-color: #25D366
}

.resp-sharing-button--whatsapp:hover {
  background-color: #1da851
}

.resp-sharing-button--hackernews {
background-color: #FF6600
}
.resp-sharing-button--hackernews:hover, .resp-sharing-button--hackernews:focus {   background-color: #FB6200 }

.resp-sharing-button--vk {
  background-color: #507299
}

.resp-sharing-button--vk:hover {
  background-color: #43648c
}

.resp-sharing-button--facebook {
  background-color: #3b5998;
  border-color: #3b5998;
}

.resp-sharing-button--facebook:hover,
.resp-sharing-button--facebook:active {
  background-color: #2d4373;
  border-color: #2d4373;
}

.resp-sharing-button--twitter {
  background-color: #55acee;
  border-color: #55acee;
}

.resp-sharing-button--twitter:hover,
.resp-sharing-button--twitter:active {
  background-color: #2795e9;
  border-color: #2795e9;
}

.resp-sharing-button--email {
  background-color: #777777;
  border-color: #777777;
}

.resp-sharing-button--email:hover,
.resp-sharing-button--email:active {
  background-color: #5e5e5e;
  border-color: #5e5e5e;
}

.resp-sharing-button--pinterest {
  background-color: #bd081c;
  border-color: #bd081c;
}

.resp-sharing-button--pinterest:hover,
.resp-sharing-button--pinterest:active {
  background-color: #8c0615;
  border-color: #8c0615;
}

.resp-sharing-button--linkedin {
  background-color: #0077b5;
  border-color: #0077b5;
}

.resp-sharing-button--linkedin:hover,
.resp-sharing-button--linkedin:active {
  background-color: #046293;
  border-color: #046293;
}

.resp-sharing-button--reddit {
  background-color: #5f99cf;
  border-color: #5f99cf;
}

.resp-sharing-button--reddit:hover,
.resp-sharing-button--reddit:active {
  background-color: #3a80c1;
  border-color: #3a80c1;
}
