html,
body {
  height: 100%;
}


.loader-logo {
  height: 64px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.loader-msg {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(0.9rem, 2.5vw, 1.15rem);
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.02em;
  min-height: 1.5rem;
  margin: 0;
  animation: msg-entrada 0.5s ease both;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #2a1f14;
  background-image: url("../img/background.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;

  &::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.08) 35%,
      rgba(0, 0, 0, 0.08) 65%,
      rgba(0, 0, 0, 0.5) 100%
    );
    z-index: -1;
  }
}

.navbar-logo {
  height: 40px;
  width: auto;
}

@media (max-width: 576px) {
  .navbar-logo {
    height: 32px;
  }
}

#overlay-carga {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;

  &.activo {
    opacity: 1;
    pointer-events: all;
  }
}

#overlay-carga .overlay-msg {
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.02em;
  animation: msg-entrada 0.5s ease both;
}

@keyframes msg-entrada {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flip-card-container {
  perspective: 1000px;
  height: 100%;
}

.flip-front.card,
.flip-back.card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

#resultados > * {
  opacity: 0;
}

#resultados > *.visible {
  animation: card-entrada 0.4s ease forwards;
}

@keyframes card-entrada {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flip-toggle {
  display: none;
}

.flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.flip-card {
  min-height: 350px;
}

.flip-toggle:checked+.flip-card {
  transform: rotateY(180deg);
}

.flip-front .card-body {
  padding-top: 2rem;
  text-align: center;
}

.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-front,
.flip-back {
  top: 0;
  left: 0;
  border-radius: 0.5rem;
}

.flip-back {
  transform: rotateY(180deg);
}

.img-card {
  height: 200px;
  object-fit: cover;
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

.img-card.loaded {
  background: none;
  animation: none;
}

@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.flip-back .card-body {
  overflow-y: auto;
  max-height: calc(100% - 60px);
}

.card-body.text-center{
  container-type: inline-size;
  width: 100%;
}

.card-title {
  font-size: clamp(1rem, 6cqw, 3rem); 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-footer {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
}

.site-footer .text-muted {
  color: rgba(255, 255, 255, 0.65) !important;
}

.text-shadow-soft {
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
}

.card-img-top,
.img-card {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

.header-transparente {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.select2-container {
  width: 100% !important;
}

.input-group>.select2-container {
  flex: 1 1 auto;
}

.select2-container--default .select2-selection--single {
  height: calc(2.375rem + 2px);
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: normal;
  color: #495057;
}

.input-group>.select2-container {
  flex: 1 1 auto;
}

.select2-container {
  width: 100% !important;
}

.select2-results__option{
  &>span{
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: auto;
    grid-template-rows: 1fr;
    align-items: center;
    justify-content: start;
    column-gap: .5rem;
    & .img-ingr{
      max-height: 3rem;
    }
    & small{
      padding-left: 1rem;
      font-size: 0.5rem;
      color: #495057;
    }
  }
}