@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

:root { --blue: #073a85; --orange: #ffa126; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; color: var(--blue); background: var(--blue) url("../images/kitchen-pattern.png") center / cover fixed; font-family: "Poppins", sans-serif; }

.chef-workspace { display: grid; grid-template-columns: clamp(210px, 16vw, 280px) minmax(0, 1fr); height: 100dvh; }
.chef-sidebar { display: flex; min-height: 0; padding: 22px 0; flex-direction: column; align-items: center; }
.sidebar-logo { width: min(185px, 52%); }
.chef-progress { position: relative; display: grid; width: calc(100% - 29px); margin: 64px 0 26px 29px; gap: 25px; }
.chef-progress-step { position: relative; z-index: 1; display: flex; min-height: 48px; padding: 4px 18px 4px 0; align-items: center; gap: 23px; color: #087aa6; font-size: clamp(15px, 1vw, 19px); }
.chef-progress-step:not(:last-child)::after { position: absolute; z-index: -1; top: 44px; left: 21px; display: none; width: 2px; height: 27px; content: ""; background: var(--orange); }
.chef-progress-step.active { min-height: 42px; padding-left: 0; gap: 18px; color: var(--blue); background: transparent; opacity: 1; }
.chef-sidebar .chef-progress-step.active::before { position: absolute; z-index: -1; inset: 0; content: ""; background: #fff; border-radius: 22px 0 0 22px; box-shadow: 0 3px 10px rgb(0 0 0 / 4%); }
.chef-progress-step.inactive { opacity: 0.62; }
.chef-progress-step.completed { color: var(--orange); opacity: 1; }
.chef-progress-step.completed strong { font-weight: 400 !important; }
.chef-progress-step.completed::after { left: 16px; display: block; }
.chef-progress-icon { display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; }
.chef-progress-step img { width: 32px; height: 32px; object-fit: contain; }
.chef-progress-step.active .chef-progress-icon { width: 32px; height: 32px; flex-basis: 32px; }
.chef-progress-step.active img { width: 32px; height: 32px; }
.chef-progress-step.completed .chef-progress-icon { width: 32px; height: 32px; flex-basis: 32px; }
.chef-progress-step.completed img { width: 32px; height: 32px; }
.chef-progress-step strong { font-weight: 400; }
.chef-progress-step.active strong { font-weight: 400; }
/* .sidebar-promotion-link envuelve la imagen cuando la promocion (configurable
   desde /promocion-chef-virtual) trae URL -- ese <a> pasa a ser el hijo real
   del flex container de .chef-sidebar, asi que hereda el tamano/margin-top:auto
   que antes tenia la imagen sola; la imagen anidada solo rellena ese espacio. */
.sidebar-promotion,
.sidebar-promotion-link { width: min(256px, 70%); max-height: 343px; margin-top: auto; }
.sidebar-promotion { object-fit: cover; object-position: top; }
.sidebar-promotion-link { display: block; overflow: hidden; }
.sidebar-promotion-link .sidebar-promotion { width: 100%; height: 100%; max-height: none; margin-top: 0; }

.diners-panel { height: calc(100dvh - 44px); min-height: 0; margin: 22px 22px 22px 0; padding: 40px; overflow-y: auto; background: #fff; border-radius: 20px; }
.diners-hero { min-height: 190px; padding: 55px 42px; color: #fff; background: #ffae19 url("../images/diners-banner.png") center / cover no-repeat; border-radius: 20px; }
.diners-hero h1 { max-width: 52%; margin: 0; color: var(--blue); font-size: clamp(26px, 2vw, 38px); font-weight: 400; line-height: 1.1; }
.diners-hero p { margin: 8px 0 0; font-size: 17px; line-height: 1.2; }
.diners-form { display: grid; min-height: calc(100% - 210px); padding-top: 40px; }
.diners-options { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); align-items: start; gap: clamp(18px, 3vw, 70px); }
/* min-width: 0 -- sin esto, un grid item usa el tamano minimo de su contenido
   (min-content) como piso, y las imagenes de personas6/7.png (275px de ancho
   real) son mas anchas que la columna en mobile -- eso las hace desbordar la
   caja en vez de encoger, sobre todo notorio en Safari/iOS. */
.diners-option { min-width: 0; cursor: pointer; text-align: center; }
.diners-option input { position: absolute; opacity: 0; }
.diners-image { display: grid; width: 100%; max-width: 295px; margin: 0 auto; aspect-ratio: 1; max-height: 295px; padding: 24px; overflow: hidden; place-items: center; background: #f9f9f9; border: 2px solid #eee; border-radius: 8px; box-shadow: 0 4px 12px rgb(0 0 0 / 5%); }
.diners-option.selected .diners-image { border-color: var(--orange); box-shadow: 0 4px 14px rgb(255 161 38 / 18%); }
.diners-image img { width: 88%; height: 88%; object-fit: contain; }
.diners-option strong { display: block; margin-top: 22px; color: #111; font-size: 18px; line-height: 1.45; }
.diners-form button { width: min(240px, 70%); min-height: 36px; margin: 20px auto 0; align-self: end; color: #fff; background: var(--orange); border: 0; border-radius: 20px; font: 700 12px "Poppins", sans-serif; text-transform: uppercase; cursor: pointer; }

@media (max-height: 820px) and (min-width: 801px) {
    .chef-sidebar { padding-block: 12px; }
    .sidebar-logo { width: 110px; }
    .chef-progress { margin-top: 20px; gap: 32px; }
    .chef-progress-step { min-height: 48px; }
    .chef-progress-icon { width: 32px; height: 32px; flex-basis: 32px; }
    .chef-progress-step img { width: 32px; height: 32px; }
    .sidebar-promotion,
    .sidebar-promotion-link { width: min(160px, 75%); max-height: 214px; }
    .diners-panel { height: calc(100dvh - 24px); margin: 12px 12px 12px 0; padding: 22px 30px; }
    .diners-hero { min-height: 130px; padding: 32px 34px; }
    .diners-hero h1 { font-size: 24px; }
    .diners-form { min-height: calc(100% - 146px); padding-top: 20px; }
    .diners-image { max-width: 205px; max-height: 205px; padding: 16px; }
    .diners-option strong { margin-top: 8px; font-size: 15px; }
    .diners-form button { min-height: 36px; margin-top: 10px; }
}
.chef-mobile-header,
.chef-mobile-progress { display: none; }
.chef-language-selector { position: absolute; top: 22px; right: 24px; display: flex; gap: 7px; margin: 0; }
.chef-language-selector button { width: 34px; height: 34px; padding: 0; overflow: hidden; background: transparent; border: 2px solid transparent; border-radius: 50%; cursor: pointer; opacity: 0.58; }
.chef-language-selector button.active { border-color: var(--orange); box-shadow: 0 0 0 2px #fff; opacity: 1; }
.chef-language-selector button img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 800px) {
    html, body { height: auto; }
    body { overflow: auto; }
    body { background-size: auto 100%; }
    .chef-workspace { display: block; min-height: 100dvh; padding: 22px 15px 30px; }
    .chef-sidebar { display: none; }
    .chef-mobile-header { position: relative; display: flex; height: 92px; align-items: flex-start; justify-content: center; }
    .chef-mobile-header > a { position: absolute; top: 10px; left: 18px; display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: var(--orange); border-radius: 50%; font-size: 28px; line-height: 1; text-decoration: none; }
    .chef-mobile-header > img { width: 100px; }
    .chef-mobile-header .chef-language-selector { display: none; }
    .chef-mobile-progress { display: block; margin-bottom: 20px; }
    .chef-mobile-progress .chef-progress { display: flex; width: 100%; margin: 0; align-items: flex-start; justify-content: space-between; gap: 0; }
    .chef-mobile-progress .chef-progress-step { display: grid; width: 25%; min-height: 0; padding: 0; justify-items: center; gap: 8px; color: #087aa6; font-size: 13px; text-align: center; }
    .chef-mobile-progress .chef-progress-step.active { background: transparent; border-radius: 0; box-shadow: none; }
    .chef-mobile-progress .chef-progress-step:not(:last-child)::after { top: 25px; left: calc(50% + 29px); width: calc(100% - 58px); height: 2px; }
    .chef-mobile-progress .chef-progress-step.completed::after { display: block; background: var(--orange); }
    .chef-mobile-progress .chef-progress-icon,
    .chef-mobile-progress .chef-progress-step.active .chef-progress-icon,
    .chef-mobile-progress .chef-progress-step.completed .chef-progress-icon { width: 54px; height: 54px; flex-basis: 54px; }
    .chef-mobile-progress .chef-progress-step img,
    .chef-mobile-progress .chef-progress-step.active img,
    .chef-mobile-progress .chef-progress-step.completed img { width: 54px; height: 54px; }
    .chef-mobile-progress .chef-progress-step strong { max-width: 76px; color: inherit; font-size: 12px; font-weight: 400; }
    .chef-mobile-progress .chef-progress-step.completed { color: var(--orange); }
    .chef-mobile-progress .chef-progress-step.active strong { color: #fff; }
    .chef-mobile-progress .chef-progress-step.inactive { opacity: 0.35; }
    /* height: auto -- la regla base (arriba, fuera de cualquier media query) fija
       height: calc(100dvh - 44px); esta regla de mobile nunca la reseteaba (solo
       tocaba min-height, que no le gana a un height explicito), asi que el panel
       se quedaba con una altura fija sin importar el contenido -- con
       overflow: visible, cualquier contenido mas alto que esa caja se salia por
       fuera del cuadro redondeado en vez de que la caja creciera con el. */
    .diners-panel { height: auto; min-height: 0; margin: 0; padding: 5px 5px 25px; overflow: visible; border-radius: 14px; }
    .diners-hero { min-height: 135px; padding: 24px 15px; background-position: center; background-size: cover; border-radius: 12px; }
    .diners-hero h1 { max-width: 300px; font-size: 26px; font-weight: 700; }
    .diners-hero p { max-width: 290px; font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; }
    .diners-form { padding: 18px 15px 0; }
    .diners-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
    .diners-image { padding: 12px; }
    .diners-option strong { margin-top: 10px; font-size: 15px; }
    .diners-form button { width: 100%; min-height: 54px; margin-top: 20px; border-radius: 32px; font-size: 17px; }
}
