/* RESTOM_MUTFAK_FIS_V1 (v2): Mutfak & Bar ekrani "mutfak fisi" gorunumu. Yalniz gorunum; yalniz #kitchenView. */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

/* Sef / Barista tek ekran (v3) */
html body.rf-tek .sidebar, html body.rf-tek .sidebar-overlay, html body.rf-tek header.top-bar,
html body.rf-tek #kitchenView .kitchen-toolbar { display: none !important; }
html body.rf-tek .app-container .main-wrapper { margin: 0 !important; width: 100% !important; max-width: 100% !important; padding: 14px 14px 80px !important; }
#rfCikis {
    position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 9000; min-height: 44px; padding: 0 20px;
    border: 1px solid #d9d4c6; border-radius: 12px; background: #fffdf6; color: #1d1b16; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 20px -12px rgba(0, 0, 0, .5);
}

/* fisler */
#kitchenView .kitchen-grid {
    display: grid !important; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)) !important;
    gap: 40px 22px !important; align-items: start !important; padding: 18px 2px 26px !important; overflow: visible !important;
}
#kitchenView .kitchen-ticket {
    position: relative; overflow: visible !important; border: 0 !important; border-radius: 0 !important;
    background: #fffdf6 !important; color: #1d1b16 !important;
    font-family: 'Space Mono', Consolas, 'Courier New', monospace;
    box-shadow: 0 0 0 1px #e4e0d4, 0 16px 24px -14px rgba(40, 30, 15, .45) !important;
    padding-top: 12px; transform-origin: 50% -8px;
    animation: rfSway 3.2s ease-in-out infinite alternate !important;
    animation-duration: 3.2s !important; animation-delay: var(--rf-faz, 0ms) !important; /* telefondaki "animasyon kapali" kuralini da asar */
}
/* ray ve mandal */
#kitchenView .kitchen-ticket::before {
    content: ""; position: absolute; left: -10px; right: -10px; top: -14px; height: 12px; border-radius: 6px; z-index: 2;
    background:
        linear-gradient(#2b2b2b, #2b2b2b) 50% 0 / 48px 12px no-repeat,
        linear-gradient(#f4f4f4, #9a9a9a);
    box-shadow: 0 5px 9px rgba(0, 0, 0, .25);
    transform-origin: 50% 6px;
    animation: rfSwayTers 3.2s ease-in-out infinite alternate !important;
    animation-duration: 3.2s !important; animation-delay: var(--rf-faz, 0ms) !important;
}
#kitchenView .kitchen-ticket:hover { transform: none; }
/* yirtik alt kenar */
#kitchenView .kitchen-ticket::after {
    content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 9px;
    background:
        linear-gradient(135deg, #fffdf6 50%, transparent 50.5%) 0 0 / 14px 100% repeat-x,
        linear-gradient(225deg, #fffdf6 50%, transparent 50.5%) 0 0 / 14px 100% repeat-x;
}
#kitchenView .kitchen-ticket-header { background: transparent !important; border: 0 !important; border-bottom: 2px dashed #b9b2a2 !important; color: #1d1b16 !important; padding: 12px 14px !important; }
#kitchenView .kitchen-table-icon { display: none !important; }
#kitchenView .kitchen-table-block h3 { font-family: inherit; font-size: 1.55rem !important; color: #1d1b16 !important; white-space: normal !important; line-height: 1.15; }
#kitchenView .kitchen-ticket-meta, #kitchenView .kitchen-ticket-meta span { color: #6a6252 !important; }
#kitchenView .kitchen-ticket-age span { color: #6a6252 !important; }
#kitchenView .kitchen-ticket-age strong { font-family: inherit; font-size: 1.25rem !important; color: #1d1b16 !important; }
#kitchenView .kitchen-ticket-age-warning strong { color: #a65f00 !important; }
#kitchenView .kitchen-ticket-age-late strong { color: #c1221a !important; }
#kitchenView .kitchen-ticket-warning { box-shadow: 0 0 0 3px #e0a63a, 0 16px 24px -14px rgba(40, 30, 15, .45) !important; }
#kitchenView .kitchen-ticket-late { box-shadow: 0 0 0 3px #d9382e, 0 16px 24px -14px rgba(40, 30, 15, .45) !important; }
#kitchenView .kitchen-ticket-late .kitchen-ticket-header::after {
    content: "GECİKTİ"; position: absolute; right: 86px; top: 20px; border: 3px solid #c1221a; color: #c1221a;
    padding: 1px 8px; font-weight: 700; font-size: .75rem; transform: rotate(-12deg); pointer-events: none; opacity: .9;
}
#kitchenView .kitchen-ticket-header { position: relative; }

/* urun satirlari */
#kitchenView .kitchen-ticket-body { padding: 4px 14px 8px !important; }
#kitchenView .kitchen-item { background: transparent !important; border: 0 !important; border-bottom: 1.5px dashed #cfc8b6 !important; border-radius: 0 !important; padding: 12px 0 !important; display: block !important; }
#kitchenView .kitchen-item-main { width: 100%; }
#kitchenView .kitchen-item-info { flex: 1; min-width: 0; }
#kitchenView .kitchen-item-side { display: flex !important; flex-direction: row !important; align-items: center !important; gap: 10px; margin-top: 10px; width: 100%; }
#kitchenView .kitchen-item-side .kitchen-ready-btn { flex: 1; }
#kitchenView .kitchen-item:last-child { border-bottom: 0 !important; }
#kitchenView .kitchen-qty { background: transparent !important; color: #1d1b16 !important; font-size: 1.15rem !important; min-width: 38px; width: auto; }
#kitchenView .kitchen-product-name { color: #1d1b16 !important; font-weight: 700; font-size: 1rem !important; white-space: normal !important; }
#kitchenView .kitchen-type-badge { background: transparent !important; border: 1.5px solid #1d1b16; color: #1d1b16 !important; border-radius: 0 !important; }
#kitchenView .kitchen-note { background: #fff1a8 !important; color: #3a2d00 !important; border: 0 !important; border-radius: 0 !important; font-weight: 700; }
#kitchenView .kitchen-time { background: transparent !important; color: #6a6252 !important; }
#kitchenView .kitchen-time-warning { color: #a65f00 !important; }
#kitchenView .kitchen-time-late { color: #c1221a !important; }
#kitchenView .kitchen-ready-btn {
    background: transparent !important; color: #1d1b16 !important; border: 2px solid #1d1b16 !important; border-radius: 0 !important;
    box-shadow: none !important; font-family: inherit; text-transform: uppercase; font-weight: 700; min-height: 44px; min-width: 96px; justify-content: center;
}
#kitchenView .kitchen-ready-btn:hover, #kitchenView .kitchen-ready-btn:active { background: #1d1b16 !important; color: #fffdf6 !important; }

/* yeni fis ve "hazir" damgasi */
#kitchenView .kitchen-ticket.rf-yeni { animation: rfDrop .7s cubic-bezier(.25, 1.5, .4, 1) both !important; animation-duration: .7s !important; animation-delay: 0ms !important; }
#kitchenView .kitchen-ticket.rf-yeni::before { animation: none !important; }
.rf-damga {
    position: fixed; z-index: 100000; pointer-events: none; transform: translate(-50%, -50%) rotate(-12deg);
    border: 4px solid #0f7a52; color: #0f7a52; background: rgba(255, 253, 246, .92); padding: 6px 18px;
    font: 700 1.5rem 'Space Mono', Consolas, monospace; animation: rfStamp 1.1s ease both;
}
@keyframes rfSway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@keyframes rfSwayTers { from { transform: rotate(1.6deg); } to { transform: rotate(-1.6deg); } }
@keyframes rfDrop { from { transform: translateY(-40px) rotate(-5deg); opacity: 0; } }
@keyframes rfStamp {
    0% { transform: translate(-50%, -50%) rotate(-12deg) scale(2.4); opacity: 0; }
    25% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; }
    75% { opacity: 1; }
    100% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 0; }
}
@media (max-width: 700px) {
    #kitchenView .kitchen-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
/* Sallanma isletme sahibinin istegiyle cihazin "hareketi azalt" ayarinda da calisir; diger efektler kapanir. */
@media (prefers-reduced-motion: reduce) {
    #kitchenView .kitchen-ticket.rf-yeni, .rf-damga { animation: none !important; }
}

/* v3 tasarim iyilestirmesi: renkli fis basligi, buyuk adet, dolu "Hazir" dugmesi */
#kitchenView .kitchen-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important; }
#kitchenView .kitchen-ticket { padding-top: 0 !important; --rf-renk: #1f6f50; box-shadow: 0 2px 3px rgba(40, 30, 15, .08), 0 22px 30px -18px rgba(40, 30, 15, .55) !important; }
#kitchenView .kitchen-ticket-warning { --rf-renk: #a85f00; }
#kitchenView .kitchen-ticket-late { --rf-renk: #b8231a; }
#kitchenView .kitchen-ticket-header { background: var(--rf-renk) !important; border-bottom: 0 !important; padding: 18px 16px 14px !important; }
#kitchenView .kitchen-table-block h3 { color: #fff !important; font-size: 1.75rem !important; letter-spacing: -.02em; }
#kitchenView .kitchen-ticket-meta, #kitchenView .kitchen-ticket-meta span, #kitchenView .kitchen-ticket-age span { color: rgba(255, 255, 255, .82) !important; }
#kitchenView .kitchen-ticket-age strong, #kitchenView .kitchen-ticket-age-warning strong, #kitchenView .kitchen-ticket-age-late strong { color: #fff !important; font-size: 1.7rem !important; line-height: 1.1; white-space: nowrap; }
#kitchenView .kitchen-ticket-late .kitchen-ticket-header::after { right: auto; left: 16px; top: auto; bottom: -13px; background: #fffdf6; z-index: 3; }
#kitchenView .kitchen-ticket-late .kitchen-ticket-body { padding-top: 14px !important; }
#kitchenView .kitchen-ticket-body { padding: 6px 16px 12px !important; }
#kitchenView .kitchen-item { padding: 14px 0 !important; }
#kitchenView .kitchen-qty { background: #1d1b16 !important; color: #fffdf6 !important; min-width: 44px; height: 38px; border-radius: 10px !important; display: grid; place-items: center; font-size: 1.1rem !important; }
#kitchenView .kitchen-product-name { font-size: 1.15rem !important; line-height: 1.3; }
#kitchenView .kitchen-type-badge { border-width: 1px; opacity: .6; }
#kitchenView .kitchen-note { font-size: .95rem !important; border-left: 4px solid #e0a800 !important; padding: 8px 10px !important; }
#kitchenView .kitchen-item-side .kitchen-ready-btn { background: #1f6f50 !important; color: #fff !important; border: 0 !important; border-radius: 12px !important; min-height: 52px; font-size: 1rem; letter-spacing: .04em; box-shadow: 0 4px 0 #134733 !important; transition: transform .08s, box-shadow .08s; }
#kitchenView .kitchen-item-side .kitchen-ready-btn:hover { background: #24805c !important; }
#kitchenView .kitchen-item-side .kitchen-ready-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #134733 !important; }
@media (max-width: 700px) { #kitchenView .kitchen-grid { grid-template-columns: minmax(0, 1fr) !important; } }
