@import "./variables.css";
@import "./global.css";


/* --------------------------------------------- Responsive for Laptop --------------------------------------------- */

/* Media query para pantallas con altura menor a 810px */
@media (max-height: 810px) {
  .offer-card {
    height: 280px;
    min-width: 340px;
  }
  
  /* Ajuste de espaciado interno para los elementos de la tarjeta */
  .offer-card h2 {
    margin-top: var(--spacing-xxs); /* Reducido de spacing-md (32px) a spacing-xs (16px) */
    margin-bottom: var(--spacing-xxs); /* Añadido un margin-bottom pequeño */
  }
  
  .offer-card p {
    margin-bottom: var(--spacing-xxs); /* Reducido de 24px a spacing-xxs (8px) */
  }
  
  .card-footer {
    padding-top: var(--spacing-xs); /* Reducido de spacing-md (32px) a spacing-xs (16px) */
  }
  
  /* Ajuste para la altura del título */
  .offer-card-tittle {
    height: auto;
  }
  
  /* Ajuste para la imagen */
  .offer-card .image-container {
    margin-bottom: var(--spacing-xxs); /* Añadido un pequeño margen abajo */
  }
}

@media (max-width: 1400px) {
  .grid-container-both {
    grid-template-columns: 280px 1fr 280px;
  }

  .select-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .select-cards > *:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: 50%;
    justify-self: center;
  }
}

@media (max-width: 1024px) {
  body {
    grid-template-areas:
      "header header"
      "main main"
      "footer footer";
    grid-template-columns: 0 1fr;
  }

  .select-cards {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
  }

  .select-cards > *:last-child:nth-child(odd) {
    grid-column: initial;
    width: 100%;
    justify-self: initial;
  }

  /* --------------- Typography styles --------------- */

  .headline-1 {
    font-size: 32px;
  }

  .display-1 {
    font-size: 28px;
  }

  .display-2 {
    font-size: 24px;
  }

  .display-3 {
    font-size: 20px;
  }

  .display-4 {
    font-size: 18px;
  }

  .display-5 {
    font-size: 16px;
  }

  .display-6 {
    font-size: 14px;
  }

  .body-1 {
    font-size: 20px;
  }

  .body-2 {
    font-size: 18px;
  }

  .body-3 {
    font-size: 16px;
  }

  .body-4 {
    font-size: 14px;
  }

  .background-pattern {
    width: 100%;
  }
  .grid-container-both {
    grid-template-columns: 1fr 300px;
  }
  #sidebar-nav-container {
    display: none;
  }
  .modal-partner-offer-img{
    display: none;
  }
}

/* --------------------------------------------- Responsive for Tablet (769px - 1099px) --------------------------------------------- */
@media screen and (min-width: 769px) and (max-width: 1099px) {
  /* Regla específica para el formulario de creación de cuenta */
  #login-panel.sidebar-large {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
  }
  
  /* Ajustar el grid para que funcione con los nuevos anchos - sidebar de navegación a la izquierda y contenido principal ocupando el resto */
  .grid-container-both {
    grid-template-columns: 280px 1fr;
    grid-template-areas: "sidebar main";
  }

  /* Cambiar la estructura del grid para grid-container-right */
  .grid-container-right {
    /* Modificar: ya no necesitamos reservar espacio para el panel de ayuda en el lado derecho */
    display: grid;
    grid-template-columns: 1fr;
    width: 100vw;
  }
  
  /* Ajuste para grid-container-right-panel (outcome pages) */
  .grid-container-right-panel {
    grid-template-columns: 1fr 400px;
  }
  
  /* Ajustar el ancho del panel lateral en las páginas de outcome */
  #outcome-panel.sidebar-right.sidebar-large {
    width: 400px;
    padding: var(--spacing-md);
  }
  
  /* Reducir la altura del mapa para todo el rango de tablets */
  .location-map {
    height: 190px;
  }
  
  /* NOTA: Las reglas para summary-cards se han movido a una media query específica para tablet pequeña */
  
  /* Ajustamos los cards para que ocupen todo el ancho disponible */
  #main-content {
    padding: var(--spacing-sm);
    width: 100%;
  }
  
  /* Los cards ocuparán todo el ancho disponible ya que el panel de ayuda
     ahora está fijo en la parte inferior y no ocupa espacio lateral */
  .offer-cards {
    width: 100%;
    padding-right: var(--spacing-xs);
  }

  /* Aseguramos que sean visibles los scrolls laterales para los cards */
  .content-group-cards {
    width: 100%;
    overflow: visible;
  }
  
  /* El contenedor de tips no debe afectar el layout */
  .tips-container {
    position: relative; /* Cambiamos a posición relativa para que no afecte el posicionamiento */
    height: 0; /* No debe ocupar espacio en el layout */
    overflow: visible; /* Permitir que el panel sea visible fuera del contenedor */
  }
  
  /* Para el Help panel, aplicamos el comportamiento móvil */
  .sidebar-right.sidebar-fixed {
    position: fixed;
    width: 100%;
    max-width: 100%;
    height: auto;
    z-index: 99999;
    border-radius: 0;
    transform: none;
    transition: max-height 0.3s ease;
    left: 0;
    padding: var(--spacing-xs);
    gap: var(--spacing-xs);
  }
  
  /* Cuando está colapsado, se muestra como una barra inferior */
  .sidebar-fixed.collapsed {
    position: fixed;
    bottom: 0;
    max-height: 64px;
    overflow: hidden;
    border-top: 1px solid var(--color-green-10);
    z-index: 999;
    width: 100%;
    left: 0;
    right: auto;
  }
  
  /* Cuando está expandido, se muestra como un panel que emerge desde abajo */
  .sidebar-fixed.expanded {
    position: fixed;
    bottom: 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 99999;
    width: 100%;
    left: 0;
    right: auto;
  }
  
  /* Necesitamos que el tips-header sea clickeable como en móvil */
  .tips-header {
    cursor: pointer;
  }
  
  /* Mostrar/ocultar íconos de abrir/cerrar */
  #tips-open {
    display: block;
  }
  
  #tips-close {
    display: none;
  }
  
  .sidebar-right.sidebar-fixed.expanded #tips-open {
    display: none;
  }
  
  .sidebar-right.sidebar-fixed.expanded #tips-close {
    display: block;
  }
  
  /* Overlay para cuando el panel está abierto */
  #dropdown-overlay.expanded {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
  }
  
  /* Hacer que el área de form llene más el espacio disponible */
  .content-form-section {
    max-width: none;
    width: 100%;
  }
  
  /* Reducir espacio vertical en title-group y content-group para los templates de outcome */
  .content-group {
    gap: var(--spacing-md);
  }
  
  /* Cambiar el tamaño de fuente del subtitle en tablets */
  .subtitle-1 {
    font-size: 18px;
  }

  /* Apply natural height strategy for tablets */
  /* main#main-content {
    height: auto;
  }
  .content-form-section {
    flex-grow: 0;
    height: auto;
  }
  #question-container {
    height: auto;
  } */
}

/* Solución basada en proporción de pantalla (vertical/tableta) */
@media screen and (min-width: 769px) and (max-width: 1099px) and (max-height: 1200px) {
  
  .sidebar-large {
    max-height: calc(100vh - 68px);
    overflow-y: auto;
    padding: var(--spacing-sm);
  }
}

/* --------------------------------------------- Responsive for Small Tablet / Tablet Portrait (769px - 880px) --------------------------------------------- */
@media screen and (min-width: 769px) and (max-width: 950px) {
  /* Aplicar layout vertical para summary-cards en tablets pequeñas */
  .summary-cards {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  /* Ajustar location-card para que se muestre correctamente en columna */
  .location-card {
    flex-direction: column-reverse;
  }
  
  /* Ajustar el padding del header de ubicación */
  .location-header {
    padding: var(--spacing-sm);
  }
  
  /* Ajustar el padding de la tarjeta de información */
  .info-card {
    padding: var(--spacing-sm);
  }

}

@media screen and (min-width: 769px) and (max-width: 1100px) {
  .legal-text {
    position: relative;
    bottom: auto;
    max-width: 100%;
    margin-top: var(--spacing-sm);
  }
}

/* --------------------------------------------- Responsive for Tablet --------------------------------------------- */

@media screen and (max-width: 1200px) {
  
  .content-form-section {
    min-height: auto;
    gap: var(--spacing-sm);
  }

  .find-property-container .content-row {
    flex-direction: column-reverse;
  }

  .grid-container--with-sidebar {
    grid-template-columns: 1fr 400px; 
  }

  .sidebar-right--fixed {
    width: 400px;
    padding: var(--spacing-lg);
  }
  
  /* Ajuste adicional para sidebar-right--fixed en templates específicos */
  .sidebar-right.sidebar-large.sidebar-right--fixed {
    width: 400px;
    padding: var(--spacing-md);
  }
  
  .large-image {
    width: 100%;
    height: auto;
  }

  .steps-container {
    padding: 0px;
  }

  .step-item {
    gap: var(--spacing-sm);
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .grid-container--with-sidebar .title-group img {
    width: 240px; /* Imagen más pequeña en pantallas medianas */
  }
}


/* --------------------------------------------- Responsive for Mobile --------------------------------------------- */

@media (max-width: 768px) {
  
  body {
    display: flex;
    flex-direction: column;
    overflow: scroll;
  }

  #sidebar-manage-account-mobile, #sidebar-nav-mobile {
    display: flex;
  }

  /* --------------- Typography styles --------------- */

  .headline-1 {
    font-size: 28px;
  }
  
  .display-1 {
    font-size: 24px;
  }

  .display-2 {
    font-size: 20px;
  }

  .display-3 {
    font-size: 18px;
  }

  .display-4 {
    font-size: 16px;
  }

  .display-5 {
    font-size: 14px;
  }

  .display-6 {
    font-size: 14px;
  }

  .body-1 {
    font-size: 18px;
  }

  .body-2 {
    font-size: 16px;
  }

  .body-3 {
    font-size: 14px;
  }

  .body-4 {
    font-size: 14px;
  }

  /* --------------- Badge styles --------------- */

  .badge-md {
    font-size: 12px;
    padding: 4px var(--spacing-xxs);
  }

  .badge-sm {
    font-size: 12px;
    padding: 4px var(--spacing-xxs);
  }

  .toast {
    width: 90vw;
  }

  /* --------------- Input styles --------------- */

  select.input-main {
    font-size: 18px;
  }

    /* --------------- Illustration styles --------------- */

  .support-illustration {
    display: none;
  }


  /* --------------- Containers styles --------------- */

  .grid-container-both {
    display: flex;
    flex-direction: column;
    width: auto;
    flex-grow: 0;
    height: auto;
    min-height: unset;
    overflow: visible;
    margin-top: 64px;
    position: static;
  }

  .support-section {
    padding: var(--spacing-xs);
  }
  
  .grid-container-right {
    display: flex;
    flex-direction: column;
    width: auto;
    flex-grow: 0;
    margin-top: 64px;
  }
  
  .grid-container-left {
    display: flex;
    flex-direction: column;
    width: auto;
    flex-grow: 0;
    height: auto;
    min-height: unset;
    overflow: visible;
    margin-top: 64px;
    position: static;
  }

  .percentage-wrapper {
    width: 100%;
  }

  .grid-container-right-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    position: relative;
    overflow: hidden;
    margin-top: 64px;
  }

  #main-content {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md) var(--spacing-sm);
    overflow: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    height: auto;
  }

  .main-content-full {
    padding: var(--spacing-md) var(--spacing-sm) !important;
  }

  .main-content-center {
    justify-content: flex-start;
  }
  .checklist-card {
    padding: var(--spacing-xs);
    position: relative;
  }

  .item-status {
    position: absolute;
    top: 16px;
    right: 16px;
  }

  .menu-content-mobile {
    position: fixed;
    background-color: var(--color-white);
    width: 85vw;
    height: 100vh;
    top: 0px;
    right: 0px;
    transition: trasform 1s linear;
  }

  .menu-list {
    overflow-y: scroll;
    height: 100%;
    padding-bottom: 100px;
  }

  .button-full-width {
    width: 100%;
  }

  .welcome-image {
    width: 100%;
    height: auto;
  }

  #sidebar-nav-container {
    display: flex;
  }

  #sidebar-nav-mobile {
    width: 100%;
  }

  /* --------------- Header styles --------------- */

  #main-header {
    grid-area: header;
    display: flex;
    position: fixed;
    align-items: center;
    width: 100%;
    z-index: 999999;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-green-5);
    padding: 0 var(--spacing-xs);
    height: 64px;
  }

  #company-logo {
    width: auto;
    height: 40px;
    margin-right: var(--spacing-xxs);
    margin-left: var(--spacing-xxs);
  }



  /* --------------- Menu dropdown styles --------------- */

  .menu-trigger, .menu-dropdown {
    display: none;
  }

  .menu-trigger-mobile, .button-avatar-mobile, .offer-button, .panel-mobile {
    display: flex;
  }

  .menu-mobile {
    display: flex;
    position: fixed;
    top: 0px;
    right: 0px;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    overflow: hidden;
  }


  .menu-mobile.collapsed {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .menu-item-mobile {
    display: flex;
    width: 100%;
    padding: 12px var(--spacing-xs);
    flex-direction: row;
    align-items: center;
    gap: var(--spacing-xxs);
  }

  #dropdown-overlay {
    padding: var(--spacing-xs);
  }
  #dropdown-overlay.collapsed {
    display: none;
  }

  .loader-overlay, #modal-delete-my-offer-container, #modal-edit-my-offer-container, #modal-schedule-call-container {
    z-index: 999999999;
  }
  
  .loader-overlay {
    gap: var(--spacing-xs);
  }

  .loader {
    width: 160px;
    height: 96px;
  }

  .loader-text {
    font-size: 18px;
  }

  #dropdown-overlay.expanded {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
  }
  .menu-header {
    display: flex;
    width: 100%;
    padding: var(--spacing-xs) var(--spacing-sm) var(--spacing-xxs);
    justify-content: space-between;
    align-items: center;
  }
  #tips-section {
    position:relative;
    z-index: 99999;
  }
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
  }

  .close-button {
    width: 32px;
    height: 32px;
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
  }

  .close-button img {
    width: 24px;
    height: 24px;
  }

  #user-avatar {
    display: none;
  }

  #user-avatar-mobile {
    display: flex;
  }

  .panel-mobile {
    display: flex;
    position: fixed;
    top: 0px;
    right: 0px;
    width: 100vw;
    height: 100vh;
    opacity: 1;
    visibility: visible;
    z-index: 99999;
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  .panel-content {
    position: fixed;
    background-color: var(--color-white);
    width: 85vw;
    height: 100vh;
    top: 0px;
    right: 0px;
  }

  .panel-content-mobile {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-neutral-20) var(--color-white);
    position: relative;
  }

  /* Estilo para la barra de desplazamiento en navegadores WebKit */
  .panel-content-mobile::-webkit-scrollbar {
    width: 6px;
  }

  .panel-content-mobile::-webkit-scrollbar-thumb {
    background-color: var(--color-neutral-30);
    border-radius: 3px;
  }
  
  #offers-panel-mobile.collapsed {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
  
  #offers-panel-mobile.expanded {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .offer-status-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    gap: var(--spacing-xxs);
  }

  .offer-info-row {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-xxs);
    padding: var(--spacing-xxs) 0px;
  }

  .offer-info-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xxs);
    width: 100%;
  }


  /* --------------- Button styles --------------- */

  .button-compact {
    height: 40px;
  }

  .button-remove {
    min-width: 61px;
    min-height: 61px;
  }

  .profile-button-wrapper {
    width: 100%;
  }

  /* --------------- Avatar styles --------------- */

  .avatar, .menu {
    width: 44px;
    height: 44px;
    font-size: 18px;
    align-items: center;
    justify-content: center;
  }

  /* --------------- Form Questions General Input styles  --------------- */

  .input-main {
    font-size: 18px;
  }

  .select-cards {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
  }

  .select-card {
    padding: var(--spacing-xs);
  }

  .select-card, .card-content {
    gap: var(--spacing-xs);
  }

  .checklist-card-footer {
    flex-direction: column;
    gap: var(--spacing-xxs);
    justify-content: flex-start;
    align-items: flex-start;
  }
  
  .content-column {
    gap: var(--spacing-xxxs);
  }
  
  #checklist-container .card-content {
    flex-direction: column;
  }
  
  .choice-card {
    padding: var(--spacing-xs);
  }

  .choise-cards {
    gap: var(--spacing-sm);
  }

  
  /* --------------- Summary Cards styles --------------- */

  .summary-cards {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  .location-header {
    padding: var(--spacing-sm);
  }


  .sign-in-image {
    width: 100%;
      height: auto;
    }

    .offer-card {
      flex: none;
      width: 100%;
      padding: var(--spacing-xs);
      height:fit-content;
      display: flex;
      flex-direction: column;
      scroll-snap-align: none;
      user-select: none;
      -webkit-user-select: none;
    }

    #offer-button-container, #help-button {
      display: none;
    }

    #current-offer-button {
      display: none;
    }

    .sidebar-right {
      padding: var(--spacing-xs);
      width: 100%;
      gap: var(--spacing-xs);
      z-index: 0;
    }

    .sidebar-fixed.collapsed {
      position: fixed;
      bottom: 0;
      max-height: 64px;
      overflow: hidden;
      border-top: 1px solid var(--color-green-10);
      z-index: 999;
      width: 100%;
      left: 0;
      right: auto;
    }
    
    .sidebar-fixed.expanded {
      position: fixed;
      bottom: 0;
      max-height: calc(100vh - 64px);
      overflow-y: auto;
      z-index: 99999;
      width: 100%;
      left: 0;
      right: auto;
    }

    .sidebar-left {
      flex-direction: column;
      gap: var(--spacing-xxs);
      padding: var(--spacing-md) var(--spacing-sm) 0px;
      background: none;
      width: 100%;
    }

    .dropdown-button {
      display: flex;
    }

    .nav-menu-group {
      position: absolute;
      top: 150px;
      width: calc(100% - 48px);
      padding: var(--spacing-xs);
      gap: var(--spacing-xs);
      background-color: var(--color-white);
      border-radius: var(--radius-sm);
      display: none;
      z-index: 99999;
    }
    

    .button-menu-group {
      display: flex;
      flex-direction: row;
      gap: var(--spacing-xxs);
      width: 100%;
      justify-content: space-between;
    }

    .tips-header {
      cursor: pointer;
    }
    #tips-open {
      display: block;
    }
    #tips-close {
      display: none;
    }
    .overlay.visible {
      visibility: visible;
      opacity: 1;
    }
    .info-card {
      padding: var(--spacing-sm);
  }
  
  .buttons-container {
    width: 100%;
    gap: var(--spacing-xs);
    align-items: flex-start;
  }

  #question-container {
    height: auto;
  }
  .location-card {
    flex-direction: column-reverse;
}

.offer-card-tittle {
  height: auto;
}

.offer-card h2 {
  margin-top: var(--spacing-xxs);
  margin-bottom: var(--spacing-xxs);
}

.offer-card p {
  margin-bottom: var(--spacing-xxs);
}

.card-footer {
  padding-top: var(--spacing-xs);
}


    .sidebar-large {
      display: flex;
      flex-direction: column;
      padding: var(--spacing-md) var(--spacing-xs);
      height: auto;
      overflow-y: auto;
    }
    .content-group {
      gap: var(--spacing-md);
    }
    .offer-cards {
      display: flex;
      flex-direction: column;
      gap: var(--spacing-sm);
      width: 100%;
      overflow: visible;
      padding: 0px 0px var(--spacing-xl) 0px;
    }
    #sidebar-nav-container-mobile {
      display: flex;
      flex-direction: column;
      width: 100%;
    }
    .prueba {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
    }
    #main-footer {
      display: none;
    }
    
    .field-row {
      display: flex;
      flex-direction: column;
      width: 100%;
      gap: var(--spacing-sm);
    }

    .plan-column-group, .plan-column-cell, .plan-column-group-small, .plan-column-group-large {
      width: 100%;
    }

    .plan-card-row {
      display: flex;
      flex-direction: column;
      width: 100%;
      gap: var(--spacing-xs);
      padding: var(--spacing-xs);
    }

    .consultation-info-group {
      display: flex;
      flex-direction: column;
      gap: var(--spacing-xs);
    }

    .support-group {
      display: flex;
      flex-direction: row;
      gap: var(--spacing-xs);
    }


    .background-pattern {
      width: 100%;
      height: 100%;
    }
    .content-row {
      display: flex;
      flex-direction: column-reverse;
      width: 100%;
    }

    .tips-container {
      position: relative;
      height: 0;
      overflow: visible;
    }

    .offer-content-group {
      display: flex;
      position: relative;
      flex-direction: row;
      width: 100%;
      justify-content: space-between;
    }

    .offer-dropdown-container {
      position: absolute;
      top: 80px;
      right: 0;
      width: 100%;
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
      z-index: 9999;
      border-radius: var(--radius-sm);
      overflow: hidden;
    }

    .offer-dropdown-container.expanded {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .offer-dropdown-content {
      display: flex;
      flex-direction: column;
      padding: var(--spacing-xs);
      background-color: var(--color-green-1);
      min-height: fit-content;
      max-height: 374px;
      overflow-y: scroll;
      scrollbar-width: none;
      -ms-overflow-style: none;
      gap: var(--spacing-xs);
      width: calc(100vw - var(--spacing-xs) - var(--spacing-xs));
      border-radius: var(--radius-md);
    }

    .legal-cta-group {
      display: flex;
      flex-direction: column;
      width: 100%;
      gap: var(--spacing-sm);
    }

    .mobile-only {
      display: flex !important;
    }
    
    #menu-help-guest.menu-dropdown {
      right: 50%;
    }
    
    #menu-help-user.menu-dropdown {
      right: 12%;
    }



/* Menú y Panel */
.menu-mobile, .panel-mobile {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.menu-mobile.expanded, .panel-mobile.expanded {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Overlay */
.overlay.visible {
  visibility: visible;
  opacity: 1;
}


  .modal-block {
    align-items: center;
  }

  .modal-container {
    min-height: 40vh;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    width: 90vw;
  }

  .modal-header {
    padding: var(--spacing-xs);
  }

  .modal-section-white {
    padding: var(--spacing-xs);
  }

  .modal-section-green {
    padding: var(--spacing-xs);
  }

  .virtual-consultation-title {
    width: 100%;
  }

  .consultation-log-row {
    gap: var(--spacing-xs);
    padding: var(--spacing-xs);
  }

  .modal-image {
    width: 100%;
    height: auto;
  }

  .consultation-card {
    padding: var(--spacing-xs);
    gap: var(--spacing-sm);
    width: 100%;
  }

  .content-block {
    gap: var(--spacing-sm);
  }

  .consultation-info-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .legal-text {
    transform: initial;
    left: 0;
    width: 100%;
    position: relative;
    bottom: initial;
    z-index: 0;
    margin-bottom: 80px;
  }

  .legal-text.expanded {
    background: transparent;
    padding: 0;
    margin-bottom: 80px;
  }

  .sidebar-right--fixed {
    position: relative;
    width: 100%;
    top: 0;
    height: auto;
    padding: var(--spacing-lg) var(--spacing-xs); /* Ajustar padding */
  }

  .content-section {
    max-width: none;
    width: 100%;
    gap: var(--spacing-xl);
    padding: 0px;
  }

  /* Welcome Input Mobile Button Grid Layout */
  #form-actions {
    display: grid;
    grid-template-areas:
        "back next"
        "progress progress";
    grid-template-columns: 1fr 1fr;
  }
  
  #back-button {
    grid-area: back;
  }
  
  #next-button {
    grid-area: next;
  }
  
  #progress-container {
    grid-area: progress;
    display: flex; /* Use flex for centering */
    justify-content: center;
    margin: 0 auto;
    width: 100%;
  }
  
  /* Ensure progress steps are visible and centered */
  .progress-steps {
    display: flex; /* Ensure visibility */
    max-width: fit-content;
    margin: 0 auto;
    justify-content: center;
  }
  /* End Welcome Input Mobile Button Grid Layout */
  .tablet-flex-column{
    flex-direction: column;
  }
}

.sidebar-mobile {
  display: flex;
  flex-direction: row;
  padding: var(--spacing-md) var(--spacing-xs) 0px var(--spacing-xs);
  justify-content: space-between;
}

.sidebar-mobile a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .grid-container--with-sidebar {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
  }

  .grid-container--with-sidebar #main-content {
    padding: var(--spacing-md) var(--spacing-sm);
    height: 100%;
  }

  .sidebar-right--fixed {
    position: relative;
    width: 100%;
    top: 0;
    height: auto;
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .grid-container--with-sidebar .title-group img {
    width: 100%;
    max-width: 320px;
  }

  .grid-container--with-sidebar .title-group .icon-back-img {
    width: 24px;
    height: 24px;
  }

  .button-back {
    display: flex;
    align-items: center;
    padding: 0px;
    justify-content: flex-start;
    gap: 0px;
  }

  .button-back img {
    margin-right: var(--spacing-xxs);  /* 8px de separación */
  }

  .large-image {
    width: 100%;
    height: auto;
  }

}

/* Específico para iPads (diferentes modelos) */
@media only screen 
and (min-device-width: 768px) 
and (max-device-width: 1024px) 
and (orientation: portrait),
only screen 
and (min-device-width: 834px) 
and (max-device-width: 1194px),
only screen 
and (min-device-width: 1024px) 
and (max-device-width: 1366px) {
  #outcome-panel .button-primary {
    margin-bottom: 64px !important;
  }
  
  /* Altura máxima para evitar que el panel crezca demasiado */
  .sidebar-large {
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
}

/* --------------------------------------------- Responsive for Tablet/Mobile (<= 1099px) --------------------------------------------- */
@media (max-width: 1099px) {

  /* Allow form height to be determined by content, don't let it grow */
  .content-form-section {
    flex-grow: 0;
    height: auto;
  }

  /* Allow question container height to be determined by content */
  #question-container {
    height: auto;
  }
}

.card-divider {
    width: 100%;
    height: 1px;
    background-color: var(--color-neutral-20);
    margin: 16px 0;
}