/* ItemConfigurator — közös tétel-konfigurátor modal (6. kör #3) */

.ic-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(20, 16, 12, .55);
    display: flex; align-items: flex-end; justify-content: center;
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    animation: ic-fade .18s ease;
}
@keyframes ic-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ic-slide { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

.ic-modal {
    width: 100%; max-width: 560px; max-height: 92vh;
    background: var(--surface, #fff); color: var(--text, #1c1714);
    border-radius: 20px 20px 0 0;
    display: flex; flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, .28);
    animation: ic-slide .22s cubic-bezier(.22, 1, .36, 1);
    overflow: hidden;
}
@media (min-width: 600px) {
    .ic-overlay { align-items: center; }
    .ic-modal { border-radius: 18px; max-height: 88vh; }
}

/* Fejléc */
.ic-head {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px; border-bottom: 1px solid rgba(0, 0, 0, .07);
    position: sticky; top: 0; background: inherit;
}
.ic-head-img { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; flex: 0 0 auto; }
.ic-head-img img { width: 100%; height: 100%; object-fit: cover; }
.ic-head-title { flex: 1 1 auto; min-width: 0; }
.ic-head-title h3 { margin: 0; font-size: 1.15rem; line-height: 1.25; font-weight: 700; }
.ic-close {
    flex: 0 0 auto; width: 36px; height: 36px; border: none; cursor: pointer;
    background: rgba(0, 0, 0, .05); border-radius: 50%; font-size: 22px; line-height: 1;
    color: inherit; transition: background .15s;
}
.ic-close:hover { background: rgba(0, 0, 0, .1); }

/* Törzs */
.ic-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 18px 18px; -webkit-overflow-scrolling: touch; }
.ic-loading { padding: 36px 0; text-align: center; color: var(--muted, #8a7f76); }

.ic-group { padding: 14px 0; border-bottom: 1px solid rgba(0, 0, 0, .05); }
.ic-group:last-child { border-bottom: none; }
.ic-group-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.ic-group-name { font-weight: 700; font-size: .98rem; }
.ic-group-hint { font-size: .76rem; color: var(--muted, #9a8f86); text-transform: uppercase; letter-spacing: .03em; flex: 0 0 auto; }

.ic-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ic-chip {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 9px 14px; border-radius: 999px;
    border: 1.5px solid rgba(0, 0, 0, .12); background: transparent; color: inherit;
    font-size: .9rem; transition: border-color .15s, background .15s, color .15s;
}
.ic-chip:hover { border-color: rgba(0, 0, 0, .28); }
.ic-chip.ic-sel {
    border-color: var(--accent, #c5a98c);
    background: var(--accent, #c5a98c);
    color: #fff;
}
.ic-chip.ic-sel .ic-opt-price { color: #fff; opacity: .92; }
.ic-opt-name { font-weight: 600; }
.ic-opt-price { font-size: .82rem; color: var(--muted, #8a7f76); white-space: nowrap; }
.ic-opt-free { font-style: italic; }

.ic-note {
    width: 100%; min-height: 56px; resize: vertical; box-sizing: border-box;
    border: 1.5px solid rgba(0, 0, 0, .12); border-radius: 12px; padding: 10px 12px;
    font: inherit; color: inherit; background: transparent;
}
.ic-note:focus { outline: none; border-color: var(--accent, #c5a98c); }

/* Élő-ár sáv */
.ic-pricebar { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .04); }
.ic-price-row { display: flex; justify-content: space-between; font-size: .92rem; padding: 2px 0; }
.ic-price-row.ic-muted { color: var(--muted, #8a7f76); font-size: .84rem; }
.ic-price-row.ic-err { color: #c0392b; font-weight: 600; justify-content: flex-start; }

/* Lábléc */
.ic-foot {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; border-top: 1px solid rgba(0, 0, 0, .08);
    background: inherit;
}
.ic-qty { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.ic-qty button {
    width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
    border: 1.5px solid rgba(0, 0, 0, .14); background: transparent; color: inherit;
    font-size: 20px; line-height: 1; transition: background .15s;
}
.ic-qty button:hover { background: rgba(0, 0, 0, .06); }
.ic-qty-val { min-width: 30px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.ic-confirm {
    flex: 1 1 auto; height: 48px; border: none; border-radius: 12px; cursor: pointer;
    background: var(--accent, #c5a98c); color: #fff; font-weight: 700; font-size: 1rem;
    transition: opacity .15s, filter .15s;
}
.ic-confirm:hover:not(:disabled) { filter: brightness(1.05); }
.ic-confirm:disabled { opacity: .5; cursor: not-allowed; }

/* Sötét mód (ha a téma használja) */
@media (prefers-color-scheme: dark) {
    .ic-modal { background: var(--surface, #211b16); color: var(--text, #f1e9e2); }
    .ic-head { border-bottom-color: rgba(255, 255, 255, .08); }
    .ic-group { border-bottom-color: rgba(255, 255, 255, .06); }
    .ic-chip { border-color: rgba(255, 255, 255, .16); }
    .ic-chip:hover { border-color: rgba(255, 255, 255, .32); }
    .ic-note { border-color: rgba(255, 255, 255, .16); }
    .ic-pricebar { background: rgba(255, 255, 255, .05); }
    .ic-foot { border-top-color: rgba(255, 255, 255, .1); }
    .ic-close { background: rgba(255, 255, 255, .08); }
    .ic-qty button { border-color: rgba(255, 255, 255, .18); }
}

/* "Testreszabás" trigger a menü-tételen (additív) */
.item-configure-btn {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    margin-top: 8px; padding: 8px 14px; border-radius: 999px;
    border: 1.5px dashed var(--accent, #c5a98c); background: transparent;
    color: var(--accent, #8a6e4e); font-size: .86rem; font-weight: 600;
}
.item-configure-btn:hover { background: rgba(197, 169, 140, .12); }
