/* --- ทำอาหารที่กองไฟ --- */
.campfire-cook-root {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
        max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.campfire-cook-root.open {
    pointer-events: auto;
    opacity: 1;
}

.campfire-cook-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 40%, rgba(40, 22, 12, 0.72) 0%, rgba(0, 0, 0, 0.78) 70%);
}

.campfire-cook-sheet {
    position: relative;
    width: min(96vw, 440px);
    max-height: min(88vh, 640px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(180deg, #3a2a1e 0%, #1e1510 38%, #120e0a 100%);
    box-shadow:
        0 0 0 1px rgba(255, 167, 38, 0.18),
        0 12px 40px rgba(0, 0, 0, 0.55);
}

.campfire-cook-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px 10px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.35);
}

.campfire-cook-title {
    margin: 0;
    font-size: var(--text-lg);
    font-weight: bold;
    color: var(--px-gold);
}

.campfire-cook-close-btn {
    flex-shrink: 0;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
}

.campfire-cook-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px;
}

.campfire-cook-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.campfire-cook-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 6px;
    border: 2px solid #5d4037;
    border-radius: 6px;
    background: linear-gradient(180deg, #2a2118, #18120e);
    color: #efebe9;
    cursor: pointer;
    min-height: var(--touch-min);
}

.campfire-cook-item.selected {
    border-color: #ffb74d;
    box-shadow: 0 0 0 1px rgba(255, 183, 77, 0.45);
}

.campfire-cook-item:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.campfire-cook-item-name {
    font-size: var(--text-xs);
    text-align: center;
    line-height: 1.3;
}

.campfire-cook-item-qty {
    font-size: 10px;
    color: #bcaaa4;
}

.campfire-cook-empty {
    margin: 8px 0;
    color: #bcaaa4;
    font-size: var(--text-sm);
    grid-column: 1 / -1;
}

.campfire-cook-foot {
    padding: 10px 14px 14px;
    border-top: 2px solid rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campfire-cook-info,
.campfire-cook-result {
    margin: 0;
    font-size: var(--text-sm);
    color: #d7ccc8;
}

.campfire-cook-result {
    color: #ffcc80;
}

.campfire-cook-confirm {
    width: 100%;
    min-height: var(--touch-min);
}

.campfire-cook-busy {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
}

.campfire-cook-busy-panel {
    width: min(88vw, 280px);
    padding: 16px;
    text-align: center;
}

.campfire-cook-busy-label {
    margin: 0 0 8px;
    color: #ffcc80;
    font-weight: bold;
}

.campfire-cook-busy-sec {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: bold;
    color: #fff8e1;
}

.campfire-cook-busy-bar {
    height: 10px;
    border: 2px solid #5d4037;
    border-radius: 4px;
    background: #1a1410;
    overflow: hidden;
}

.campfire-cook-busy-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ef6c00, #ffb74d);
}

.campfire-cook-root.is-cooking .campfire-cook-close-btn {
    opacity: 0.45;
    pointer-events: none;
}
