/* 
  © 2025 datsforge 
  Proprietary – See LICENSE for details. 
*/


/* === CONTAINER === */
/* Surface background for content wrapping */
.container {
  background-color: var(--md-sys-color-surface);
  margin: var(--md-sys-spacing-4xl) var(--md-sys-spacing-6xl);
}

/* === SECTION VARIANTS === */

.section {
  padding-block: var(--md-sys-spacing-sm);
}

.section-divider {
  padding-top: var(--md-sys-spacing-2xl);
  border-top: var(--md-sys-border-thin) solid var(--md-sys-color-outline-variant);
}

.section-divider-thin {
  padding-top: var(--md-sys-spacing-lg);
  border-top: 0.4px solid var(--md-sys-color-outline-variant);
}

.section-centered {
  text-align: center;
}

/* === FLEX LAYOUT COMPONENTS === */
/* Vertical stack layout */
.layout-column {
  display: flex;
  flex-direction: column;
  gap: var(--md-sys-spacing-sm);
}

/* Horizontal row layout */
.layout-row {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--md-sys-spacing-sm);
}

.test-layout {
  width: 100%;
  display: flex;
  flex-direction: row;
  /* flex-wrap: nowrap; */
  justify-content: space-around;
  gap: var(--md-sys-spacing-sm);
}

.layout-legal-page h2,
.layout-legal-page h3 {
  line-height: 2.7;
}

/* === ALIGNMENT UTILITIES === */

/* Align items along the cross-axis (Y in row, X in column) */
.align-start {
  align-items: flex-start;
}

.align-center {
  align-items: center;
  text-align: center;
}

.align-end {
  align-items: flex-end;
  text-align: end;
}

.align-stretch {
  align-items: stretch;
}

/* Justify content along the main axis (X in row, Y in column) */
.justify-start {
  justify-content: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.justify-between {
  justify-content: space-between;
}

.justify-around {
  justify-content: space-around;
}

.justify-evenly {
  justify-content: space-evenly;
}

/* === FLEXIBLE TABLE === */
.flex-table {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--md-sys-shape-extra-large);
  background-color: var(--md-sys-color-surface-container-lowest);

}

/* orientation */
.flex-table.row {
  flex-direction: row;
  justify-content: flex-start;
  align-content: flex-start;
}

.flex-table.column {
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}


/* table cell */
.flex-table-cell {
  display: flex;
  position: relative;
  align-items: baseline;
  justify-content: baseline;
  background-color: var(--md-sys-color-surface-container);
  color: var(--md-sys-color-on-surface);
  font-family: var(--md-sys-font-family-primary);
  border-radius: var(--md-sys-shape-large);
  box-shadow: var(--md-sys-elevation-0);
  transition: background-color 0.2s ease;
  overflow: hidden;
  position: relative;
  text-align: left;
  padding: var(--md-sys-spacing-lg);
  flex-direction: column;
  z-index: var(--md-sys-z-index-container);
  transition:
    background-color 300ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* empty cell */
.flex-table-cell:empty::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
}

/* size */
.flex-table-cell.small {
  width: 120px;
  height: 100px;
  font-size: var(--md-sys-typescale-body-small);
}

.flex-table-cell.medium {
  width: 180px;
  height: 140px;
  font-size: var(--md-sys-typescale-body-medium);
}

.flex-table-cell.large {
  width: 240px;
  height: 180px;
  font-size: var(--md-sys-typescale-body-small);
}

.flex-table-cell.xl {
  width: 300px;
  /* height: 220px; */
  font-size: var(--md-sys-typescale-body-medium);
}

/* Optional header */
.flex-table-header {
  font-weight: 600;
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  padding: 0.75rem;
  border-radius: var(--md-sys-shape-small);
}

.flex-table-cell.transparent {
  background-color: transparent;
}

.flex-table-cell:hover,
.flex-table-cell:focus-visible {
  background-color: var(--md-sys-color-surface-container-high);
  box-shadow:
    0 1px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 6px 2px rgba(38, 36, 36, 0.1),
    0 6px 18px 5px rgba(0, 0, 0, 0.06);
  transform: scale(1.08);
}

/* Underline animation */
.skills-header {
  text-decoration: none;
  position: relative;
  transition: color var(--md-sys-motion-short);
}

.skills-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 70%;
  height: 4px;
  background-color: currentColor;
  border-radius: 2px;
  opacity: 0;
  transform: translateX(-50%);
  transition:
    width var(--md-sys-motion-medium),
    opacity var(--md-sys-motion-short);
}

.flex-table-cell:hover .skills-header::after,
.flex-table-cell:focus-within .skills-header::after {
  width: 100%;
  opacity: 1;
  left: 50%;
}

/* === Labels === */
.label {
  display: inline-flex;
  position: relative;
  overflow: hidden;
  justify-content: center;
  align-items: center;
  align-self: baseline;
  color: var(--md-sys-color-on-primary-container);
  padding: var(--md-sys-spacing-sm);
  font-family: var(--md-sys-font-family-priamry);
  font-size: var(--md-sys-typescale-label-small);
  outline: 1px var(--color-red) solid;
  border-radius: var(--md-sys-shape-medium, 1.5rem) 0 var(--md-sys-shape-medium, 1.5rem) 0;
  text-shadow: 0px 0px 3px var(--color-yellow);
  z-index: var(--md-sys-z-index-overlay);
}

/* === SVG icon inside the button === */
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  border-radius: var(--md-sys-shape-medium, 1.5rem);
  box-shadow: var(--md-sys-elevation-1, 0 1px 2px rgba(0, 0, 0, 0.08));
  padding: var(--md-sys-spacing-sm);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  outline: none;
  gap: var(--md-sys-spacing-sm);
  font-family: var(--md-sys-font-family-secondary);
  font-size: var(--md-sys-typescale-label-large);
}

.card-content .icon-button {
  background-color: var(--md-sys-color-surface-container-high);
}

.icon-button.unclickable {
  cursor: default;
}

.icon-button.outline {
  border: 1px solid var(--color-red);
}

.icon-button:focus-visible {
  box-shadow: 0 0 0 2px var(--md-sys-color-primary);
}

.icon-button .icon {
  transition: transform 0.6s cubic-bezier(.4, 0, .2, 1), opacity 0.2s;
  width: 24px;
  height: 24px;
}

.icon-button .icon.custom-size {
  width: unset;
  height: unset;
}

.icon-button.toggled .icon {
  transform: rotate(180deg) scale(1.1);
  opacity: 0.85;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  box-shadow: 0 2px 8px rgba(103, 80, 164, 0.10);
}

/* Animate on hover or click */
/* Button bounce animation */
.icon-button.animate-button:hover,
.icon-button.animate-button:active,
.icon-button.animate-button:focus-visible {
  animation: bouncePop 300ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transform-origin: center;
}

/* Icon bounce animation */
.icon-button.animate-button:hover .animate-icon,
.icon-button.animate-button:active .animate-icon,
.icon-button.animate-button:focus-visible .animate-icon,
.flex-table-cell:hover .animate-icon,
.flex-table-cell:active .animate-icon,
.flex-table-cell:focus-visible .animate-icon {
  animation: iconBounce 380ms cubic-bezier(0.36, 1.65, 0.3, 1) both;
  transform-origin: center;
}

@keyframes bouncePop {
  0% {
    transform: scale(0.88);
    opacity: 0.7;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* === Toggle Button with icon(Invisible Checkbox) use on checkbox with label  === */
.toggle-button {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Toggle Button Label  */
.toggle-button-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--md-sys-spacing-xs);
  border-radius: var(--md-sys-shape-small);
  color: var(--md-sys-color-on-surface-variant);
  background-color: transparent;
  cursor: pointer;
  transition: background-color var(--md-sys-motion-medium), color var(--md-sys-motion-medium);
}

/* Shared Icon Styles */
.toggle-button-label .icon,
.toggle-button-label .icon-small,
.toggle-button-label .icon-medium {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--md-sys-motion-medium);
}

/*  Checked State (Active Toggle)  */
.toggle-button:checked~.toggle-button-label,
.toggle-button:hover~.toggle-button-label {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.toggle-button:checked~.toggle-button-label .icon,
.toggle-button:checked~.toggle-button-label .icon-small,
.toggle-button:checked~.toggle-button-label .icon-medium {
  color: var(--md-sys-color-on-secondary-container);
}

/* Floating Action Button (FAB) */
.fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: var(--md-sys-z-index-fab);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 56px;
  height: 56px;
  border-radius: 50%;

  background-color: var(--color-red);
  color: var(--color-on-background);

  border: none;
  outline: none;
  cursor: pointer;

  font-size: 1.5rem;

  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.3),
    0 4px 6px rgba(0, 0, 0, 0.15);

  transform: translateY(0) scale(1);
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover state: slight elevation & tone shift */
.fab:hover {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.25),
    0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Pressed/Active state */
.fab:active {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  transform: scale(0.95);
}

/* Focus-visible (keyboard nav) */
.fab:focus-visible {
  box-shadow:
    0 0 0 3px var(--md-sys-color-secondary),
    0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Icon inside FAB */
.fab svg {
  width: 28px;
  height: 28px;
  /* fill: var(--color-on-background); */
  pointer-events: none;
  transition: fill 0.2s ease;
  fill: currentColor;
}

/* Optional fab hide animation */
.fab-hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.85) translateY(20px);
}

/* Optional Bounce Hover Effect */
.fab-bounce-hover:hover {
  animation: fabBounce 0.4s ease-out;
  transform-origin: center;
}

/* Bounce keyframes */
@keyframes fabBounce {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.2);
  }

  60% {
    transform: scale(0.96);
  }

  100% {
    transform: scale(1);
  }
}

/* Optional Icon shoot up effect */
.fab-icon-shoot-up {
  display: inline-block;
  will-change: transform, opacity;
}

.fab:hover .fab-icon-shoot-up {
  animation: shootUp 0.4s ease;
}

@keyframes shootUp {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  35% {
    transform: translateY(-14px);
    opacity: 0.7;
  }

  60% {
    transform: translateY(-24px);
    opacity: 0;
  }

  65% {
    transform: translateY(28px);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: var(--md-sys-spacing-lg);
}

th,
td {
  text-align: left;
  padding: var(--md-sys-spacing-sm);
  border-bottom: 1px solid var(--md-sys-color-outline);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Utility */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === Cards === */
.card {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: var(--md-sys-spacing-2xl);
  border-radius: var(--md-sys-shape-extra-large);
  background-color: var(--md-sys-color-surface-container);
  box-shadow: var(--md-sys-elevation-2);
  /* border-bottom: var(--border-size, 1px) solid var(--color-border); */
  text-align: start;
  transition:
    background-color 0.2s cubic-bezier(.4, 0, .2, 1),
    box-shadow 0.2s cubic-bezier(.4, 0, .2, 1),
    opacity 0.6s ease, transform 0.6s ease;
}

.card:hover,
.card:focus-visible,
.card.hover-track:hover,
.card.hover-track:focus-visible {
  background-color: var(--md-sys-color-surface-container-high);
  box-shadow:
    0 1px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 6px 2px rgba(0, 0, 0, 0.10),
    0 6px 18px 5px rgba(0, 0, 0, 0.06);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

/* Alignment Variant: Right Aligned */
.card.align-right {
  text-align: end;
}

/* Card Media (Image) */
.card-media {
  max-width: 35vw;
  max-height: 70vh;
  height: auto;
  object-fit: contain;
  align-self: flex-start;
}

/* Card Content */
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: var(--md-sys-spacing-md);
  text-decoration: none;
  width: 100%;
}

/* Align Content Within Card */
.card.align-right .card-content {
  align-items: flex-end;
}

.card.align-left .card-content {
  align-items: flex-start;
}

/* Link Group Inside Cards */
.card .link-with-icon-group {
  display: flex;
  flex-direction: column;
  gap: var(--md-sys-spacing-sm);
}

.card.align-left .link-with-icon-group {
  align-items: flex-start;
}

.card.align-right .link-with-icon-group {
  align-items: flex-end;
}

.card:hover .card-content .icon-button,
.card:focus-visible .card-content .icon-button {
  background-color: var(--md-sys-color-surface-container-highest);
  box-shadow:
    0 1px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 6px 2px rgba(0, 0, 0, 0.10),
    0 6px 18px 5px rgba(0, 0, 0, 0.06);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.card:hover .card-content .icon-button:hover,
.card:focus-visible .card-content .icon-button:focus-visible {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  box-shadow: 0 2px 8px rgba(103, 80, 164, 0.10);
}

/* === Icon Sizes === */
.icon-small {
  width: 12px;
  height: 12px;
}

.icon {
  width: 24px;
  height: 24px;
}

.icon-medium,
.slider-pane .icon {
  width: 32px;
  height: 32px;
}

.icon-large {
  width: 64px;
  height: 64px;
}

/* === Text Button With Icon (Link Style) === */
.button-text-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--md-sys-spacing-xs);
  text-decoration: none;
  position: relative;
  cursor: pointer;

  /* color: var(--md-sys-color-on-surface-variant); */
  font-size: var(----md-sys-typescale-body-medium);
  font-family: var(--md-sys-font-family-secondary);

  transition: color var(--md-sys-motion-short);
}

/* === Underline Animation === */
.button-text-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 80%;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  opacity: 0;
  transform: translateX(-50%);
  transition:
    width var(--md-sys-motion-medium),
    opacity var(--md-sys-motion-short);
}

.button-text-icon:hover::after,
.button-text-icon:focus::after,
.button-text-icon:active::after {
  width: 100%;
  opacity: 1;
  left: 50%;
}

.button-text-icon .icon {
  width: 24px;
  height: 24px;
  margin-left: 12px;
  margin-right: 0;
}

/* === Optional Modifier: Icon Before or After === */
.button-text-icon.icon-start {
  flex-direction: row-reverse;
}

.button-text-icon.icon-start .icon {
  margin-right: 12px;
  margin-left: 0;
}

/* === Slider Pane Component === */
:root {
  --slideMargin: 4px;
  --slideWidth: 150px;
  /* Default, may be overridden by JS */
  --slideCount: 3;
  /* Default, may be overridden by JS */
  --sliderSpeed: 12s;
  /* Default, may be overridden by JS */
}

.slider-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 40vw;
  border-radius: var(--md-sys-shape-medium);
  background-color: var(--md-sys-color-surface-container-low);
  box-shadow: var(--md-sys-elevation-2);
}

.slide-wrapper {
  position: relative;
  overflow: hidden;
  padding: var(--md-sys-spacing-sm) 0;
  width: 100%;
  height: 100%;
}

.slide-track {
  display: flex;
  height: 100%;
  animation: slideScroll var(--sliderSpeed) linear infinite;
  width: calc((var(--slideWidth) + cal((var(--slideMargin))*2) * var(--slideMargin)) * var(--slideCount) * 2);
}

.slide {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--md-sys-spacing-sm);
  width: var(--slideWidth);
  height: 100%;
  flex-shrink: 0;
  border-radius: var(--md-sys-shape-medium);
  margin: 0 var(--slideMargin);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: var(--md-sys-motion-short);
  padding: var(--md-sys-spacing-md) 0;
  background: var(--md-sys-color-surface-container-high);
  border: none;
  font-family: var(--md-sys-font-family-secondary);
  font-size: var(--md-sys-typescale-label-medium);
}

.slide:hover {
  transform: scale(1.20);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
  z-index: var(--md-sys-z-index-overlay);
  background: var(--md-sys-color-surface-container-highest);
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--md-sys-shape-medium);
  border: 1px solid var(--color-red);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-sizing: border-box;
  z-index: 3;
}

.slide:hover::before {
  opacity: 1;
  transform: scale(1);
}

.slide:hover .animate-icon,
.slide:active .animate-icon,
.slide:focus-visible .animate-icon {
  animation: iconBounce 380ms cubic-bezier(0.36, 1.65, 0.3, 1) both;
  transform-origin: center;
}

@keyframes slideScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-1 * (var(--slideWidth) + 2 * var(--slideMargin)) * var(--slideCount)));
  }
}

@keyframes iconBounce {
  0% {
    transform: scale(0.8) rotate(0deg);
  }

  30% {
    transform: scale(1.28) rotate(18deg);
  }

  60% {
    transform: scale(0.92) rotate(-12deg);
  }

  85% {
    transform: scale(1.06) rotate(4deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes iconBounce2 {
  0% {
    transform: scale(0.7) rotate(0deg);
  }

  30% {
    transform: scale(1.6) rotate(25deg);
  }

  60% {
    transform: scale(0.85) rotate(-18deg);
  }

  85% {
    transform: scale(1.2) rotate(8deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}

/* ==== Fireflies === */
.firefly {
  animation: firefly-move var(--duration, 8s) linear infinite,
    firefly-flicker 2s infinite alternate;
}

@keyframes firefly-flicker {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  70% {
    opacity: 0.4;
  }
}

@keyframes firefly-move {
  0% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(var(--move-x), 0);
  }

  50% {
    transform: translate(var(--move-x), var(--move-y));
  }

  75% {
    transform: translate(0, var(--move-y));
  }

  100% {
    transform: translate(0, 0);
  }
}

/* ==== Falling leaves ==== */
.falling-leaves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.leaf {
  position: absolute;
  will-change: transform, opacity;
  pointer-events: none;
  opacity: 0.7;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.10));
}

@keyframes leaf-fall {
  0% {
    transform: translateY(0) rotate(var(--leaf-rotate, 0deg));
    opacity: 0.9;
  }

  90% {
    opacity: 0.8;
  }

  100% {
    transform: translateY(110vh) rotate(var(--leaf-rotate-end, 80deg));
    opacity: 0;
  }
}

@keyframes leaf-sway {
  0% {
    margin-left: 0;
  }

  100% {
    margin-left: var(--sway, 180px);
  }
}

/* ==== Contact form ==== */
.card.contact-details-section {
  flex: 1 1 0;
  min-width: 40vw;
}

.contact-description {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  justify-content: center;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  justify-content: center;
  gap: var(--md-sys-spacing-sm);
}

.contact-form-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--md-sys-spacing-sm);
  flex: 1 1 auto;
}

.contact-form-section form {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: var(--md-sys-spacing-md);
  width: 100%;
}

.form-group {
  margin: var(--md-sys-spacing-md);
  position: relative;
}

.form-group label {
  position: absolute;
  top: 10px;
  left: 16px;
  color: var(--md-sys-color-on-surface-variant);
  pointer-events: none;
  transition: all 0.2s ease;
  font: var(--md-sys-typescale-body-small);
}

.form-group.checkbox-group label {
  position: unset;
  pointer-events: unset;
}

/* .form-group.focused label, */
.form-group.focused label:not(.checkbox-label),
.form-group input:not(:placeholder-shown)+label:not(.checkbox-label),
.form-group textarea:not(:placeholder-shown)+label:not(.checkbox-label),
.form-group select:not(:placeholder-shown)+label:not(.checkbox-label) {
  top: -10px;
  left: 12px;
  font-size: var(--md-sys-typescale-label-medium);
  background: var(--md-sys-color-surface);
  padding: 0 8px;
  color: var(--md-sys-color-primary);
}

.contact-form-section input,
.contact-form-section textarea,
.contact-form-section select {
  width: 100%;
  padding: 12px 10px 6px;
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-medium);
  font: var(--md-sys-typescale-body-small);
  transition: all 0.2s ease;
  background: transparent;
  color: var(--md-sys-color-on-surface);
}

.contact-form-section select {
  padding: 12px 10px 12px;
}

.contact-form-section input:focus,
.contact-form-section textarea:focus,
.contact-form-section select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 1px var(--md-sys-color-primary);
}

.contact-form-section input::placeholder,
.contact-form-section textarea::placeholder .contact-form-section select::placeholder {
  color: transparent;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  padding: 11px;
  border-radius: var(--md-sys-shape-medium);
  font-size: var(--md-sys-typescale-body-medium);
  transition: all 0.3s ease;
}

.form-status.success {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border: 1px solid var(--md-sys-color-primary);
}

.form-status.error {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  border: 1px solid var(--md-sys-color-error);
}

.form-actions {
  margin-top: var(--md-sys-spacing-sm);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  padding: 0 12px;
  gap: 2rem;
}

/*doesn't work see also the contact-form js*/
/* .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
} */

/* ======== Text Button ======== */

.textbutton.filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: none;
  padding: 11px 17px;
  border-radius: var(--md-sys-shape-extra-large);
  font-size: var(--md-sys-typescale-label-large);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--md-elevation-1);
}

.form-actions .textbutton.filled {
  align-self: flex-end;
}

.textbutton.filled:hover {
  box-shadow: var(--md-elevation-2);
  color: var(--md-sys-color-on-secondary);
}

.textbutton.filled::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--md-sys-color-surface-dim);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.textbutton.filled:hover::after {
  box-shadow: var(--md-elevation-2);
  opacity: 0.08;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/*==== Animate on show ====*/

/* popup aimation for main header intro (not using this)*/
.main-header-intro.animate-on-show {
  opacity: 0;
  transform: scale(0.92) translateY(40px);
  transition:
    opacity 0.7s cubic-bezier(.4, 0, .2, 1),
    transform 0.7s cubic-bezier(.4, 0, .2, 1);
  will-change: opacity, transform;
  display: inline-block;
}

.main-header-intro.animate-on-show.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.main-header.animate-on-show {
  opacity: 0;
  transform: translateX(-80px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.card.animate-on-show,
.flex-table.animate-on-show,
.layout-column.animate-on-show {
  transition: opacity 0.6s ease, transform 0.6s ease;
  opacity: 0;
  transform: translateY(40px);
}

.container.animate-on-show:not(.slider-pane) {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(40px);
}

.card.animate-on-show,
.flex-table.animate-on-show {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08),
    0 6px 18px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.animate-on-show.show,
.flex-table.animate-on-show.show,
.container.animate-on-show.show:not(.slider-pane),
.layout-column.show,
.main-header-intro.animate-on-show.show,
.main-header.animate-on-show.show {
  opacity: 1;
  transform: none;
}

/* Error Banner */
.error-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 9999;
  background: var(--md-sys-color-error, #b00020);
  color: var(--md-sys-color-on-error, #fff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1em 2em;
  font-size: 1.1em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: opacity 0.3s;
}

.error-banner[hidden] {
  display: none;
}

#error-dismiss {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.5em;
  cursor: pointer;
  margin-left: 1em;
}

/* ==== Check Box ==== */
.checkbox-group {
  display: flex;
  align-items: flex-start;
}

.checkbox-label {
  display: flex;
  align-self: center;
  gap: var(--md-sys-spacing-sm);
  user-select: none;
  font-size: var(--md-sys-typescale-body-medium);
  color: var(--md-sys-color-on-surface);
  margin-left: var(--md-sys-spacing-sm);
}

.checkbox-group input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-extra-small);
  position: relative;
  transition: border-color 0.2s, background-color 0.2s;
  background-color: transparent;
}

.checkbox-group input[type="checkbox"]:checked {
  background-color: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
}

.checkbox-group input[type="checkbox"]:checked::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 6px;
  height: 12px;
  border: solid var(--md-sys-color-on-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text a {
  text-decoration: underline;
  color: var(--md-sys-color-primary);
}

/* ==== CUSTOM SELECT DROP DOWN ====  */
.custom-dropdown {
  position: relative;
  font-family: var(--md-sys-font-family-primary);
  font-size: var(--md-sys-typescale-body-large-size);
  color: var(--md-sys-color-on-surface);
}

.dropdown-label {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: var(--md-sys-typescale-body-large);
  color: var(--md-sys-color-on-surface-variant);
  background-color: var(--md-sys-color-surface);
  padding: 0 4px;
  transition: 0.2s ease all;
  pointer-events: none;
  z-index: var(--md-sys-z-index-container);
}

.dropdown-selected {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-medium);
  padding: 12px 12px 6px 12px;
  cursor: pointer;
  position: relative;
  min-height: var(--md-sys-spacing-4xl);
}

.dropdown-selected::after {
  /* content: '▾'; */
  /* Down arrow icon (can replace with SVG if needed) */
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--md-sys-color-on-surface-variant);
}

.dropdown-selected::before {
  /* Display placeholder when no value selected */
  content: attr(data-placeholder);
  /* Subtle placeholder color */
  color: var(--md-sys-color-on-surface-variant);
  position: absolute;
  left: 12px;
  top: 20px;
  pointer-events: none;
}

/* Hide placeholder when a real value is selected */
.custom-dropdown.filled .dropdown-selected::before {
  display: none;
}

/* Change border color when dropdown is open */
.custom-dropdown.open .dropdown-selected,
.custom-dropdown.open .dropdown-icon {
  border-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-primary);
}

/* Float label on open or after selection */
.custom-dropdown.open .dropdown-label,
.custom-dropdown.filled .dropdown-label {
  top: -8px;
  font-size: var(--md-sys-typescale-label-large);
  color: var(--md-sys-color-primary);
}

.dropdown-options {
  display: none;
  position: absolute;
  width: 100%;
  margin-top: 4px;
  background: var(--md-sys-color-surface-container-high);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--md-sys-shape-large);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  z-index: 10;
  list-style: none;
  padding: 0;
}

.dropdown-options li {
  padding: 10px 12px;
  cursor: pointer;
  border-radius: var(--md-sys-shape-large);
  transition: background-color 0.2s ease;
}

.dropdown-options li:hover {
  background: var(--md-sys-color-surface-container-highest);
}

.dropdown-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  fill: var(--md-sys-color-on-surface-variant);
  pointer-events: none;
}

/** ==== SNACKBARS ==== **/
.snackbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-inverse-on-surface);
  padding: 14px 24px;
  border-radius: var(--md-sys-shape-medium);
  font-size: var(--md-sys-typescale-body-medium);
  box-shadow: var(--md-sys-elevation-4);
  opacity: 0;
  pointer-events: none;
  transition: var(--md-sys-motion-medium);
  z-index: var(--md-sys-z-index-snackbar);
}

.snackbar.show {
  opacity: 1;
  pointer-events: auto;
}

/** Snackbar that shows indicates field with error **/
.field-snackbar {
  position: absolute;
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  padding: 8px 12px;
  border-radius: var(--md-sys-shape-medium);
  font-size: var(--md-sys-typescale-body-medium);
  box-shadow: var(--md-sys-elevation-4);
  z-index: var(--md-sys-z-index-snackbar);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: var(--md-sys-motion-medium);
}

.field-snackbar.show {
  opacity: 1;
}

/* === Type Styles === */
.field-snackbar.error {
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
}

.field-snackbar.success {
  background-color: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-inverse-on-surface);
}

.field-snackbar.info {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.field-snackbar.warning {
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
}
