/* =========================================================================
 * מטגנת הזהב — stations-dough-fry.css
 * עיצוב תחנות הבצק (dough.js) והטיגון (fry.js). שורש התחנה: 1044x572.
 * ========================================================================= */

/* ======================= משותף ======================= */
.dough-toolbar, .fry-toolbar { height: 42px; pointer-events: none; }
.dough-toolbar > *, .fry-toolbar > * { pointer-events: auto; }
.dough-title, .fry-title {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 14px 2px 10px;
  background: var(--cream); border: 3px solid var(--paper-line); border-radius: 999px;
  box-shadow: 0 3px 0 #d2ad7c; font-size: 18px; white-space: nowrap;
}
.dough-title svg, .fry-title svg { width: 30px; height: 30px; }

/* ======================= תחנת הבצק ======================= */
.dough-backdrop { position: absolute; inset: 0; }
.dough-steps { display: flex; gap: 6px; }
.dough-steps span {
  display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700;
  background: rgba(255, 255, 255, 0.85); border: 2px solid #eedbbd; border-radius: 999px; padding: 3px 12px 3px 8px;
}
.dough-steps i {
  font-style: normal; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--gold); color: var(--cocoa); font-weight: 900; font-size: 13px; box-shadow: 0 2px 0 var(--gold-3);
}

/* מדף */
.dough-shelf {
  position: absolute; right: 12px; top: 62px; width: 196px; bottom: 12px; padding: 8px 8px 4px;
  display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(#fff6e6, #fbe6c6);
}
.dough-shelf-title, .dough-cutters-title { font-size: 17px; font-weight: 900; text-align: center; }
.dough-jar {
  flex: 1; display: flex; align-items: center; gap: 4px; padding: 0 4px 4px; min-height: 0;
  background: transparent; border: none; border-bottom: 9px solid #c98b52; border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 0 #9c6233; cursor: pointer; font-family: var(--font); color: var(--cocoa);
  transition: transform 0.12s, background 0.15s; text-align: right;
}
.dough-jar:hover:not(:disabled) { transform: translateY(-3px); }
.dough-jar svg { flex: none; }
.dough-jar.selected { background: radial-gradient(ellipse at 40% 60%, rgba(246, 196, 69, 0.55), rgba(246, 196, 69, 0) 70%); }
.dough-jar.selected svg { filter: drop-shadow(0 0 5px rgba(224, 164, 42, 0.9)); }
.dough-jar.locked { cursor: default; opacity: 0.6; filter: grayscale(0.7); }
.dj-text { display: flex; flex-direction: column; line-height: 1.15; }
.dj-text b { font-size: 16px; }
.dj-text small { font-size: 11.5px; color: #9a7650; font-weight: 600; }
.dough-jar.selected .dj-text small { color: var(--good); font-weight: 800; }

/* חותכנים */
.dough-cutters {
  position: absolute; right: 220px; left: 12px; top: 62px; height: 100px; padding: 4px 10px;
  display: flex; align-items: center; gap: 10px;
}
.dough-cutters-title { width: 54px; line-height: 1.1; }
.dough-cutters-row { flex: 1; display: flex; gap: 8px; justify-content: space-around; }
.dough-cutter {
  width: 118px; height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: #fff; border: 3px solid #eedbbd; border-radius: 16px; cursor: pointer;
  font-family: var(--font); color: var(--cocoa); box-shadow: 0 3px 0 #e2c79e; transition: transform 0.12s, border-color 0.15s;
}
.dough-cutter small { font-size: 12.5px; font-weight: 700; margin-top: -2px; white-space: nowrap; }
.dough-cutter:hover:not(:disabled) { transform: translateY(-3px) rotate(-3deg); }
.dough-cutter.selected { border-color: var(--gold); background: #fff6d6; box-shadow: 0 0 0 3px rgba(246, 196, 69, 0.45), 0 3px 0 var(--gold-3); }
.dough-cutter.locked { cursor: default; opacity: 0.55; filter: grayscale(0.8); }

/* משטח */
.dough-board-wrap { position: absolute; right: 220px; left: 12px; top: 170px; height: 236px; }
.dough-board { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.dough-reroll { position: absolute; left: 16px; bottom: 14px; z-index: 2; }
.dough-ghost { pointer-events: none; transition: opacity 0.12s; }
.dough-ghost.bad { opacity: 0.35; }
.cut-pop { animation: cutPop 0.75s ease-out forwards; transform-box: fill-box; transform-origin: 50% 50%; pointer-events: none; }
@keyframes cutPop {
  0% { transform: scale(0.92); }
  35% { transform: translateY(-16px) scale(1.15); }
  100% { transform: translateY(-70px) scale(0.6); opacity: 0; }
}
.rerolled { animation: reroll 0.45s ease-out; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes reroll { 0% { transform: scale(0.82, 1.12); } 60% { transform: scale(1.04, 0.97); } 100% { transform: none; } }

/* מגש */
.dough-tray {
  position: absolute; right: 220px; left: 12px; top: 414px; bottom: 10px; padding: 6px 12px 8px;
  background: linear-gradient(#e9eef2, #c9d3dc); border: 4px solid #9fb0bf; border-radius: 22px;
  box-shadow: inset 0 3px 8px rgba(255, 255, 255, 0.7), inset 0 -4px 10px rgba(60, 75, 90, 0.25), 0 6px 14px rgba(90, 45, 12, 0.2);
  display: flex; flex-direction: column;
}
.dough-tray-head { display: flex; align-items: center; gap: 8px; height: 26px; }
.dough-tray-head b { font-size: 17px; }
.dough-tray-hint { font-size: 13px; font-weight: 700; margin-inline-start: auto; }
.dough-tray-empty { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; color: #6b7783; }
.dough-slots { flex: 1; display: flex; gap: 10px; min-height: 0; }
.dough-slot {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; padding: 4px 8px 4px 6px;
  background: rgba(255, 255, 255, 0.78); border: 3px solid #b9c3cc; border-radius: 16px;
}
.dough-slot.empty { border-style: dashed; cursor: pointer; background: rgba(255, 255, 255, 0.45); }
.dough-slot.empty:hover { background: rgba(255, 255, 255, 0.7); }
.dough-slot.target { border-color: var(--gold); border-style: solid; background: #fff8dc; animation: slotGlow 1.1s ease-in-out infinite alternate; }
@keyframes slotGlow { from { box-shadow: 0 0 0 0 rgba(246, 196, 69, 0.2); } to { box-shadow: 0 0 0 5px rgba(246, 196, 69, 0.45); } }
.dough-slot.just-added { animation: slotPop 0.45s ease-out; }
@keyframes slotPop { 0% { transform: scale(0.85); } 60% { transform: scale(1.05); } 100% { transform: none; } }
.ds-num {
  position: absolute; top: -9px; right: -7px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--cocoa); color: #fff; font-weight: 900; font-size: 14px; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.ds-pic { flex: none; }
.ds-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ds-info b { font-size: 15px; }
.ds-want { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ds-want .chip { font-size: 11.5px; line-height: 17px; }
.ds-status { font-size: 12px; font-weight: 800; color: #8a6a48; }
.ds-status.ok { color: var(--good); }
.ds-status.bad { color: var(--bad); }
.ds-status.oil { color: #c27815; }
.ds-trash { flex: none; width: 36px; height: 36px; background: #fff0ec; border-color: #f0b0a6; box-shadow: 0 3px 0 #d98b7f; }
.dough-slots.many .ds-pic { width: 56px; height: 56px; }
.dough-slots.many .ds-want .chip span { max-width: 70px; overflow: hidden; text-overflow: ellipsis; }

/* ======================= תחנת הטיגון ======================= */
.fry-main {
  position: absolute; left: 0; top: 0; width: 834px; height: 572px;
  background: linear-gradient(#4d5660, #3a424a);
}
.fry-main.drop-ready .fry-slot:not(.busy) ellipse { stroke: #ffffff; animation: dropPulse 0.6s ease-in-out infinite alternate; }
@keyframes dropPulse { from { opacity: 0.6; } to { opacity: 1; } }
.fry-pot { position: absolute; left: 0; top: 0; }
.fry-toolbar { right: 220px; left: 10px; }
.fry-legend {
  display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 700;
  background: rgba(255, 255, 255, 0.85); border: 2px solid #c6dfe1; border-radius: 999px; padding: 4px 12px;
}
.fry-legend span { display: inline-flex; align-items: center; gap: 4px; }
.fry-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.lg-zone { background: rgba(63, 174, 91, 0.45); border: 2px solid var(--good); }
.lg-burn { background: repeating-linear-gradient(45deg, #e0402f 0 3px, #ff8a7a 3px 6px); }
.fry-timer-chip {
  display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; font-size: 13px; font-weight: 800;
  background: #fff; border: 2px solid #e05d44; color: #b23a25; border-radius: 999px; padding: 2px 10px 2px 6px;
}

/* אנימציות בסיר */
.flame { animation: flame 0.5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flame { from { transform: scaleY(0.85); } to { transform: scaleY(1.12); } }
.oil-bubble { animation: oilPop 2s ease-out infinite; transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; }
@keyframes oilPop { 0% { transform: scale(0.2); opacity: 0; } 50% { opacity: 0.85; } 100% { transform: scale(1.3); opacity: 0; } }
.fry-bub { animation: fryBub 1.1s ease-out infinite; transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; }
.fry-slot.hot .fry-bub { animation-duration: 0.75s; }
@keyframes fryBub { 0% { transform: translateY(0) scale(0.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-16px) scale(1.15); opacity: 0; } }
.fry-ripple { animation: ripple 1.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes ripple { from { transform: scale(0.94); opacity: 0.35; } to { transform: scale(1.06); opacity: 0.7; } }
.fry-flip.flipping { animation: fryFlip 0.4s ease-in-out; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes fryFlip { 0% { transform: none; } 50% { transform: translateY(-26px) scaleY(0.08); } 100% { transform: none; } }
.fry-slot.busy:hover .fry-flip { filter: brightness(1.08) drop-shadow(0 0 4px #fff3c4); }

/* כרטיסי בקרה */
.fry-cards { position: absolute; left: 0; top: 344px; width: 834px; height: 222px; }
.fry-card {
  position: absolute; top: 0; height: 218px; padding: 6px 6px 8px;
  background: var(--cream); border: 3px solid var(--paper-line); border-radius: 16px; box-shadow: 0 4px 0 #2a3036;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.fry-card.empty { background: rgba(255, 248, 236, 0.16); border: 3px dashed rgba(255, 243, 196, 0.6); box-shadow: none; color: #fff3c4; justify-content: center; text-align: center; }
.fry-card.empty small { color: #e8dcc0; font-size: 12px; line-height: 1.25; padding: 0 6px; }
.fc-empty-num { font-size: 15px; font-weight: 800; opacity: 0.8; }
.fc-empty-text { font-size: 24px; font-weight: 900; }
.fry-card.active-ticket { border-color: var(--gold); }
.fry-card.alert { border-color: var(--good); animation: cardAlert 0.7s ease-in-out infinite alternate; }
@keyframes cardAlert { from { box-shadow: 0 4px 0 #2a3036, 0 0 0 0 rgba(63, 174, 91, 0.3); } to { box-shadow: 0 4px 0 #2a3036, 0 0 0 6px rgba(63, 174, 91, 0.55); } }
.fry-card.burnt { border-color: var(--bad); background: #ffe9e5; animation: none; }
.fc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 15px; }
.fc-target { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; background: #fff; border: 1.5px solid #ecd6b3; border-radius: 999px; padding: 0 6px 0 3px; }
.fc-gauges { display: flex; gap: 18px; justify-content: center; }
.fc-status { font-size: 13px; font-weight: 800; min-height: 18px; text-align: center; white-space: nowrap; }
.fc-status.good { color: var(--good); }
.fc-status.warn { color: #c47a00; }
.fc-status.bad { color: var(--bad); }
.fc-status.timer { color: #b23a25; direction: rtl; }
.fc-buttons { display: flex; gap: 6px; margin-top: auto; }
.fc-buttons .btn-small { padding: 5px 12px; font-size: 14px; }

/* מד טיגון אנכי */
.fg-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.fg {
  position: relative; width: 26px; height: 96px; border-radius: 13px; overflow: hidden;
  background: #f0dfc4; border: 2px solid #d2ad7c;
}
.fg-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; z-index: 1; border-top: 3px solid var(--cocoa); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45); }
.fg-zone { position: absolute; left: 0; right: 0; z-index: 2; background: rgba(63, 174, 91, 0.33); border-top: 2px solid var(--good); border-bottom: 2px solid var(--good); }
.fg-burn { position: absolute; left: 0; right: 0; top: 0; z-index: 2; background: repeating-linear-gradient(45deg, rgba(224, 64, 47, 0.75) 0 3px, rgba(255, 138, 122, 0.6) 3px 6px); }
.fg-target { position: absolute; left: 0; right: 0; height: 2px; z-index: 3; background: #1f6b33; opacity: 0.8; }
.fg-label { font-size: 13px; font-weight: 900; padding: 0 7px; border-radius: 999px; }
.fg-wrap.active .fg { border-color: #e05d44; box-shadow: 0 0 0 2px rgba(224, 93, 68, 0.35); }
.fg-wrap.active .fg-label { background: #e05d44; color: #fff; }
.fg-wrap.active .fg-label::before { content: '🔥'; font-size: 10px; margin-left: 2px; }
.fg-wrap.in-zone .fg { border-color: var(--good); }
.fg-wrap.burnt .fg { border-color: var(--bad); }

/* מגש בתחנת הטיגון */
.fry-tray {
  position: absolute; right: 12px; top: 10px; bottom: 12px; width: 196px; padding: 8px 6px 6px;
  display: flex; flex-direction: column;
  background: linear-gradient(#f2f5f8, #d9e1e8); border-color: #9fb0bf;
}
.fry-tray-title { display: flex; flex-direction: column; align-items: center; line-height: 1.15; margin-bottom: 6px; }
.fry-tray-title b { font-size: 19px; }
.fry-tray-title small { font-size: 12px; }
.fry-tray-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 2px; }
.fry-tray-list::-webkit-scrollbar { width: 6px; }
.fry-tray-list::-webkit-scrollbar-thumb { background: #9fb0bf; border-radius: 3px; }
.fry-tray-empty { text-align: center; color: #6b7783; font-weight: 700; font-size: 14px; padding: 30px 6px; }
.fry-tray-item {
  display: flex; align-items: center; gap: 4px; padding: 3px 4px; cursor: grab;
  background: #fff; border: 2px solid #c9d3dc; border-radius: 12px; box-shadow: 0 2px 0 #b2bec9;
  transition: transform 0.1s;
}
.fry-tray-item:hover { transform: translateX(-3px); border-color: var(--gold); }
.fry-tray-item:active { cursor: grabbing; }
.fry-tray-item.active-ticket { border-color: #e2c26a; background: #fffbea; }
.fry-tray-item svg { flex: none; }
.fti-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.fti-text b { font-size: 13.5px; white-space: nowrap; }
.fti-target { display: inline-flex; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; }
.fti-status { font-size: 11.5px; font-weight: 800; color: #8a6a48; }
.fti-status.good { color: var(--good); }
.fti-status.warn { color: #c47a00; }
.fti-status.bad { color: var(--bad); }
