/**
 * @file theme.css
 * shadcn/ui-compatible theme variables for Haven Theme.
 *
 * You can customize these values without rebuilding the compiled CSS.
 * Tools like https://tweakcn.com can help generate these values. Copy this
 * file to your web root, so it sits next to index.php, and clear Drupal's
 * cache. Then, any changes you make in this file should be reflected right away.
 */

/*
  --background: oklch(0.9789 0.0082 121.6272);
  --foreground: oklch(0 0 0);
  --card: oklch(1.0000 0 0);
  --card-foreground: oklch(0 0 0);
  --popover: oklch(1.0000 0 0);
  --popover-foreground: oklch(0 0 0);
  --primary: oklch(0.5106 0.2301 276.9656);
  --primary-foreground: oklch(1.0000 0 0);
  --secondary: oklch(0.511 0.096 186.391);
  --secondary-foreground: oklch(1.0000 0 0);
  --muted: oklch(0.92 0.012 276.97);
  --muted-foreground: oklch(0.38 0 0);
  --accent: oklch(0.72 0.155 70.08);
  --accent-foreground: oklch(0 0 0);
*/

:root {
  /* SoftPopSch Theme en tweakcn */
  --background: oklch(0.9789 0.0082 121.6272);
  --foreground: oklch(0.18 0.005 121.6272);
  /* Soft Charcoal orgánico */

  --card: oklch(1 0 0);
  --card-foreground: oklch(0.18 0.005 121.6272);

  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.18 0.005 121.6272);

  --primary: oklch(0.5106 0.2301 276.9656);
  --primary-foreground: oklch(1 0 0);

  --secondary: oklch(0.45 0.082 186.391);
  /* Teal profundo con más peso estructural */
  --secondary-foreground: oklch(1 0 0);

  --muted: oklch(0.935 0.006 121.6272);
  /* Gris lino cálido en armonía con el fondo */
  --muted-foreground: oklch(0.38 0 0);

  --accent: oklch(0.72 0.155 70.08);
  --accent-foreground: oklch(0.18 0.005 121.6272);

  --destructive: oklch(0.6368 0.2078 25.3313);
  --destructive-foreground: oklch(1 0 0);
  --border: oklch(0.82 0 0);
  --input: oklch(0.42 0 0);
  --ring: oklch(0.7853 0.1041 274.7134);
  --chart-1: oklch(0.5106 0.2301 276.9656);
  --chart-2: oklch(0.7038 0.123 182.5025);
  --chart-3: oklch(0.7686 0.1647 70.0804);
  --chart-4: oklch(0.6559 0.2118 354.3084);
  --chart-5: oklch(0.7227 0.192 149.5793);
  --sidebar: oklch(0.9789 0.0082 121.6272);
  --sidebar-foreground: oklch(0 0 0);
  --sidebar-primary: oklch(0.5106 0.2301 276.9656);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.7686 0.1647 70.0804);
  --sidebar-accent-foreground: oklch(0 0 0);
  --sidebar-border: oklch(0.82 0 0);
  --sidebar-ring: oklch(0.7853 0.1041 274.7134);
  --radius: 1rem;
  --shadow-x: 0px;
  --shadow-y: 0px;
  --shadow-blur: 0px;
  --shadow-spread: 0px;
  --shadow-opacity: 0.05;
  --shadow-color: #1a1a1a;
  --shadow-2xs: 0px 1px 3px 0px hsl(0 0% 10% / 0.12);
  --shadow-xs: 0px 2px 6px 0px hsl(0 0% 10% / 0.14);
  --shadow-sm: 0px 2px 8px 0px hsl(0 0% 10% / 0.15), 0px 1px 3px -1px hsl(0 0% 10% / 0.12);
  --shadow: 0px 4px 12px 0px hsl(0 0% 10% / 0.16), 0px 2px 4px -1px hsl(0 0% 10% / 0.12);
  --shadow-md: 0px 6px 16px 0px hsl(0 0% 10% / 0.18), 0px 3px 6px -2px hsl(0 0% 10% / 0.14);
  --shadow-lg: 0px 10px 24px 0px hsl(0 0% 10% / 0.2), 0px 4px 8px -4px hsl(0 0% 10% / 0.14);
  --shadow-xl: 0px 16px 32px 0px hsl(0 0% 10% / 0.22), 0px 8px 12px -6px hsl(0 0% 10% / 0.16);
  --shadow-2xl: 0px 24px 48px 0px hsl(0 0% 10% / 0.28), 0px 12px 20px -8px hsl(0 0% 10% / 0.18);
  --tracking-normal: normal;
  --spacing: 0.25rem;

  --font-sans: "Nunito Sans", ui-sans-serif, sans-serif, system-ui;
  /*  --font-serif: "Bitter", ui-serif, serif;*/
  --font-serif: "Source Serif 4", ui-serif, serif;
  --font-mono: "Fira Mono", ui-monospace, monospace;

  /* Extra color variants for primary, secondary and accent */
  /* color-mix() blends two colors in a specified color space. */
  /* Syntax: color-mix(in <colorspace>, <color1> <percentage>, <color2>) */
  /* https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/color-mix */
  --primary-light: color-mix(in oklch, var(--primary) 80%, white);
  --primary-dark: color-mix(in oklch, var(--primary) 80%, black);
  --secondary-light: color-mix(in oklch, var(--secondary) 90%, white);
  --secondary-dark: color-mix(in oklch, var(--secondary) 85%, black);
  --accent-light: color-mix(in oklch, var(--accent) 95%, white);
  --accent-dark: color-mix(in oklch, var(--accent) 95%, black);

  /* Set navbar height for hero billboard overlay */
  --navbar-height: calc(var(--spacing) * 14);

  @media (min-width: 1280px) {
    --navbar-height: calc(var(--spacing) * 22);
  }

  @media (min-width: 768px) {
    --navbar-height: calc(var(--spacing) * 20);
  }
}

.dark {
  --background: oklch(0.2155 0.0254 284.0647);
  --foreground: oklch(0.8787 0.0426 272.2767);
  --card: oklch(0.2429 0.0304 283.911);
  --card-foreground: oklch(0.8787 0.0426 272.2767);
  --popover: oklch(0.4037 0.032 280.152);
  --popover-foreground: oklch(0.8787 0.0426 272.2767);
  --primary: oklch(0.637 0.237 25.331);
  --primary-foreground: oklch(0 0 0);
  --secondary: oklch(0.546 0.245 262.881);
  --secondary-foreground: oklch(1 0 0);
  --muted: oklch(0.2973 0.0294 276.2144);
  --muted-foreground: oklch(0.751 0.0396 273.932);
  --accent: oklch(0.443 0.1928 261.1087);
  --accent-foreground: oklch(1 0 0);
  --destructive: oklch(0.7556 0.1297 2.7642);
  --destructive-foreground: oklch(0.2429 0.0304 283.911);
  --border: oklch(0.324 0.0319 281.9784);
  --input: oklch(0.324 0.0319 281.9784);
  --ring: oklch(0.7871 0.1187 304.7693);
  --chart-1: oklch(0.7871 0.1187 304.7693);
  --chart-2: oklch(0.8467 0.0833 210.2545);
  --chart-3: oklch(0.8577 0.1092 142.7153);
  --chart-4: oklch(0.8237 0.1015 52.6294);
  --chart-5: oklch(0.9226 0.0238 30.4919);
  --sidebar: oklch(0.1828 0.0204 284.2039);
  --sidebar-foreground: oklch(0.8787 0.0426 272.2767);
  --sidebar-primary: oklch(0.7871 0.1187 304.7693);
  --sidebar-primary-foreground: oklch(0.2429 0.0304 283.911);
  --sidebar-accent: oklch(0.8467 0.0833 210.2545);
  --sidebar-accent-foreground: oklch(0.2429 0.0304 283.911);
  --sidebar-border: oklch(0.4037 0.032 280.152);
  --sidebar-ring: oklch(0.7871 0.1187 304.7693);
  --font-sans: Nunito Sans, ui-sans-serif, sans-serif, system-ui;
  --font-serif: Gelasio, ui-serif, serif;
  --font-mono: Fira Mono, ui-monospace, monospace;
  --radius: 0.35rem;
  --shadow-x: 0px;
  --shadow-y: 4px;
  --shadow-blur: 6px;
  --shadow-spread: 0px;
  --shadow-opacity: 0.12;
  --shadow-color: hsl(240 30% 25%);
  --shadow-2xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
  --shadow-xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
  --shadow-sm: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 1px 2px -1px hsl(240 30% 25% / 0.12);
  --shadow: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 1px 2px -1px hsl(240 30% 25% / 0.12);
  --shadow-md: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 2px 4px -1px hsl(240 30% 25% / 0.12);
  --shadow-lg: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 4px 6px -1px hsl(240 30% 25% / 0.12);
  --shadow-xl: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 8px 10px -1px hsl(240 30% 25% / 0.12);
  --shadow-2xl: 0px 4px 6px 0px hsl(240 30% 25% / 0.3);
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);

  --font-sans: var(--font-sans);
  --font-mono: var(--font-mono);
  --font-serif: var(--font-serif);

  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  --shadow-2xs: var(--shadow-2xs);
  --shadow-xs: var(--shadow-xs);
  --shadow-sm: var(--shadow-sm);
  --shadow: var(--shadow);
  --shadow-md: var(--shadow-md);
  --shadow-lg: var(--shadow-lg);
  --shadow-xl: var(--shadow-xl);
  --shadow-2xl: var(--shadow-2xl);
}

* {
  border-color: var(--border);
  outline-color: color-mix(in srgb, var(--ring) 50%, transparent);
}

body {
  background-color: var(--background);
  color: var(--foreground);
}

/* Views Exposed Form Styling (Exact 1:1 match with /comunidad filter design) */
.views-exposed-form {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-end !important;
  gap: 1rem !important;
  width: 100% !important;
}

.views-exposed-form .form-item,
.views-exposed-form .js-form-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.375rem !important;
  margin: 0 !important;
  flex: 1 1 180px !important;
  min-width: 150px !important;
  position: relative !important;
}

.views-exposed-form label {
  display: block !important;
  font-size: 0.75rem !important; /* text-xs */
  font-weight: 600 !important; /* font-semibold */
  text-transform: uppercase !important; /* uppercase */
  letter-spacing: 0.05em !important; /* tracking-wider */
  color: var(--muted-foreground, #6b7280) !important;
  line-height: 1rem !important;
  margin-bottom: 0.375rem !important;
}

.views-exposed-form select.form-select,
.views-exposed-form select {
  width: 100% !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  border-radius: 0.75rem !important; /* rounded-xl */
  border: 1px solid var(--input, #e5e7eb) !important;
  background-color: var(--card, #ffffff) !important;
  padding: 0.625rem 2.5rem 0.625rem 1rem !important; /* px-4 py-2.5 pr-10 */
  font-size: 0.875rem !important; /* text-sm */
  font-weight: 500 !important; /* font-medium */
  color: var(--foreground, #1f2937) !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2371717a' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 1rem 1rem !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out !important;
}

.views-exposed-form select.form-select:hover,
.views-exposed-form select:hover {
  border-color: color-mix(in oklch, var(--primary) 50%, transparent) !important;
}

.views-exposed-form select.form-select:focus,
.views-exposed-form select:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 20%, transparent) !important;
}

.views-exposed-form .form-actions {
  display: flex !important;
  align-items: flex-end !important;
  gap: 0.5rem !important;
  margin: 0 !important;
  padding-bottom: 0.125rem !important;
}

.views-exposed-form input[type="submit"].button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0.75rem !important; /* rounded-xl */
  padding: 0.625rem 1.25rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.25rem !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
}

.views-exposed-form input[type="submit"].form-submit:not(#edit-reset) {
  background-color: var(--primary) !important;
  color: var(--primary-foreground, #fff) !important;
  border: 1px solid var(--primary) !important;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

.views-exposed-form input[type="submit"].form-submit:not(#edit-reset):hover {
  filter: brightness(1.08) !important;
}

.views-exposed-form input[type="submit"]#edit-reset {
  background-color: transparent !important;
  color: var(--muted-foreground) !important;
  border: 1px solid var(--input) !important;
  text-decoration: none !important;
}

.views-exposed-form input[type="submit"]#edit-reset:hover {
  background-color: var(--muted) !important;
  color: var(--foreground) !important;
}
