/* =========================================
   MODAL: search list + create path
   ========================================= */

/* Search input */
.flow-search-input-wrap {
    position: relative;
    margin-bottom: 12px;
}
.flow-search-input-wrap .flow-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6f7a8e;
    pointer-events: none;
    font-size: 0.9rem;
}
.flow-search-input {
    width: 100%;
    padding: 11px 12px 11px 36px;
    border-radius: 10px;
    border: 1px solid #2b3547;
    background: #0f1420;
    color: #f5f7fb;
    font-size: 16px;
    font-family: inherit;
}
.flow-search-input::placeholder { color: #6f7a8e; }
.flow-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Result list */
.flow-result-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.flow-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #1a2131;
    border: 1px solid #2b3547;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
    text-align: left;
    width: 100%;
    font-family: inherit;
    color: inherit;
}
.flow-result-row:hover {
    border-color: #3b82f6;
    transform: translateY(-1px);
}
.flow-result-row .thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #0f1520;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    overflow: hidden;
    border: 1px solid #252f42;
    background-size: cover;
    background-position: center;
}
.flow-result-row .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* When no image is available, the thumb renders the shared yellow-burger
   SVG placeholder. Size it to fit the 44x44 thumb box. */
.flow-result-row .thumb.thumb-placeholder .activity-cover-placeholder-icon {
    width: 28px;
    height: 28px;
}
.flow-result-row .body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.flow-result-row .name {
    color: #f6f9ff;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.flow-result-row .sub {
    color: #8a95a9;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.flow-result-row .sub b { color: #cdd6e4; font-weight: 700; }
.flow-result-row .score {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.78rem;
    padding: 4px 8px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 999px;
    flex: 0 0 auto;
}
.flow-result-row .score strong { color: #f5f7fb; font-weight: 800; }
.flow-result-row .score.empty {
    background: transparent;
    border-color: #2b3547;
    color: #6f7a8e;
    font-size: 0.7rem;
}

.flow-result-empty {
    padding: 14px;
    text-align: center;
    color: #8a95a9;
    font-size: 0.88rem;
    border: 1px dashed #2b3547;
    border-radius: 12px;
}
.flow-result-empty b { color: #f5f7fb; }

/* --------- Add-burger flow overlay + pickers --------- */
.add-burger-flow {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 15, 0.82);
    backdrop-filter: blur(6px);
    z-index: 120;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
}
.add-burger-flow[hidden] { display: none; }

.add-burger-flow-card {
    width: 100%;
    max-width: 480px;
    background: #131824;
    color: #f5f7fb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

@media (min-width: 640px) {
    .add-burger-flow { padding: 24px; align-items: center; }
    .add-burger-flow-card { border-radius: 18px; max-height: calc(100vh - 48px); }
}

.add-burger-flow-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 14px 18px;
    border-bottom: 1px solid #222a39;
    background: #181f2c;
}

.add-burger-flow-header h3 {
    flex: 1;
    font-size: 1.05rem;
    margin: 0;
}

.flow-back-button,
.flow-close-button {
    background: transparent;
    border: none;
    color: #cbd3df;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 1.15rem;
}
.flow-close-button { font-size: 1.5rem; line-height: 1; }
.flow-back-button[hidden] { display: none; }

.flow-step {
    display: none;
    padding: 14px 18px 18px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.flow-step.active { display: block; }

.flow-step-hint {
    color: #9aa5b6;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.flow-loading {
    color: #9aa5b6;
    text-align: center;
    padding: 22px 0;
}

.place-picker-grid,
.burger-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.picker-card {
    background: #1a2131;
    border: 1px solid #2b3547;
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    transition: border-color 0.15s ease, transform 0.1s ease;
    position: relative;
}
.picker-card:hover {
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.picker-card-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    background: #0f1520;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 2.4rem;
}
.picker-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.picker-card-name {
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.25;
    color: #f6f9ff;
}

.picker-card-meta {
    font-size: 0.76rem;
    color: #8a95a9;
}

.picker-score-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: #9aa5b6;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 999px;
    padding: 3px 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.picker-score-pill strong {
    color: #f5f7fb;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
.picker-score-pill.empty {
    background: transparent;
    border-color: #2b3547;
    color: #6f7a8e;
}

.picker-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
.picker-badge .v-badge { width: 20px; height: 20px; }

.flow-inline-cta {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px dashed #3a475e;
    background: transparent;
    color: #cdd6e4;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 4px;
}
.flow-inline-cta:hover { border-color: #3b82f6; color: #fff; }

.flow-inline-form {
    background: #0f1420;
    border: 1px solid #222c3f;
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.flow-inline-form[hidden] { display: none; }
.flow-inline-form label {
    font-size: 0.82rem;
    color: #a7b1c2;
}
.flow-inline-form input,
.flow-inline-form select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #2d3850;
    background: #1a212e;
    color: #f5f7fb;
    font-size: 1rem;
}
.flow-inline-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.flow-suggest-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.flow-suggest-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #8a95a9 50%),
        linear-gradient(135deg, #8a95a9 50%, transparent 50%);
    background-position:
        calc(100% - 14px) 50%,
        calc(100% - 9px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 26px;
}
.flow-suggest-field input[data-role="custom"] {
    margin-top: 4px;
}
.flow-inline-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.flow-place-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #0f1420;
    border-radius: 10px;
}
.flow-place-header .picker-card-media {
    width: 42px;
    height: 42px;
    aspect-ratio: 1 / 1;
    font-size: 1.3rem;
}
.flow-place-header strong { font-size: 1rem; }

/* Unified chip picker used by Carne, Pan and Toppings on the "Nueva burga"
   form. Carne and Pan are single-select horizontal rows (scroll on overflow);
   Toppings is a multi-select wrapping grid capped at ~3 rows. */
.burga-chip-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}
.burga-chip-field > label {
    font-size: 0.78rem;
    color: #cdd7e5;
    font-weight: 700;
}

/* Header row: field label on the left, inline "Buscar…" filter on the right.
   The filter narrows the chip set as the user types (e.g. "ched" → just
   "cheddar") so picking common values in a big taxonomy stays a one-tap job
   instead of a scroll hunt. */
.burga-chip-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.burga-chip-field-head > label {
    font-size: 0.78rem;
    color: #cdd7e5;
    font-weight: 700;
    flex: 0 0 auto;
}
.burga-chip-filter {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 220px;
    padding: 0.35rem 0.7rem;
    border: 1px solid #2e3646;
    background: #0f1420;
    color: #eef2f7;
    border-radius: 999px;
    /* 16px so iOS WebKit doesn't auto-zoom on focus (issue #26). */
    font-size: 16px;
    font-family: inherit;
    /* disables double-tap zoom on Android Chromium + other mobile browsers */
    touch-action: manipulation;
}
.burga-chip-filter::placeholder { color: #6f7a8e; }
.burga-chip-filter:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.burga-chip-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 6px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.burga-chip-row::-webkit-scrollbar { display: none; }

/* Toppings: wrap into ~3 rows. Height cap = 3 * chip-height (≈34px) + gaps,
   with vertical scroll if the user's custom additions push past that. */
.burga-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: calc(3 * 34px + 2 * 6px + 10px);
    overflow-y: auto;
    padding: 4px 2px 6px;
    scrollbar-width: thin;
}

.burga-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 0.45rem 0.7rem;
    border: 1px solid #2e3646;
    background: #101623;
    color: #eef2f7;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    /* disables double-tap zoom so rapid chip-tapping is stable on mobile */
    touch-action: manipulation;
}
.burga-chip:hover { border-color: #38445a; background: #131a28; }
.burga-chip.active {
    border-color: #f2c200;
    background: #f2c200;
    color: #1a1708;
}
.burga-chip:focus-visible {
    outline: 2px solid #2ea4ff;
    outline-offset: 2px;
}
/* "+ Agregar 'X'" affordance — appears inside the chip grid when the user's
   typed query has no exact match, so adding a new meat/bun/topping is a
   one-tap job from the same input that filters existing ones. */
.burga-chip-add-new {
    border-style: dashed;
    border-color: #3b82f6;
    color: #9ab8ff;
    background: rgba(59, 130, 246, 0.08);
}
.burga-chip-add-new:hover {
    background: rgba(59, 130, 246, 0.16);
    color: #cfe0ff;
    border-color: #3b82f6;
}
.burga-chip-selected-label {
    font-size: 0.75rem;
    color: #8a95a9;
    margin: 0;
}
.burga-chip-empty {
    font-size: 0.8rem;
    color: #8a95a9;
    margin: 0;
    padding: 0.45rem 0.2rem;
}

