/* bastCOM FitPilot v0.21.21 – Kühlschrankfoto und Rezeptvorschläge */

.photo-mode-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.photo-mode-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 84px;
    color: inherit;
    text-decoration: none;
    border-radius: 2px !important;
}

.photo-mode-card strong,
.photo-mode-card small {
    display: block;
}

.photo-mode-card small {
    margin-top: 3px;
    color: var(--muted);
}

.photo-mode-card > b {
    color: var(--muted);
    font-size: 24px;
}

.pantry-mode-card {
    border-left: 4px solid #a7f3d0 !important;
}

.meal-mode-card {
    border-left: 4px solid #38bdf8 !important;
}

.pantry-scan-intro,
.pantry-scan-card,
.meal-photo-intro {
    border-radius: 2px !important;
}

.pantry-scan-intro {
    border-top: 3px solid #a7f3d0 !important;
}

.pantry-scan-head,
.pantry-result-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.pantry-scan-head h2,
.pantry-result-title h3 {
    margin: 2px 0 6px;
}

.pantry-step-badge {
    flex: 0 0 auto;
    padding: 8px 10px;
    border: 1px solid rgba(167, 243, 208, .5);
    background: rgba(167, 243, 208, .1);
    color: #a7f3d0;
    font-weight: 800;
    border-radius: 2px;
}

.pantry-flow-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    list-style: none;
    margin: 18px 0;
    padding: 0;
    border: 1px solid var(--line);
}

.pantry-flow-steps li {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 8px 12px;
    border-right: 1px solid var(--line);
    color: var(--muted);
}

.pantry-flow-steps li:last-child {
    border-right: 0;
}

.pantry-flow-steps li.active {
    background: rgba(167, 243, 208, .08);
    color: var(--text);
}

.pantry-flow-steps b,
.pantry-recipe-number {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    background: #a7f3d0;
    color: #07131a;
    font-size: 13px;
    font-weight: 900;
    border-radius: 2px;
}

.pantry-upload-form {
    padding-top: 4px;
}

.pantry-upload-form input[type="file"] {
    min-height: 54px;
}

.pantry-scan-card {
    margin-top: 14px;
    border-left: 3px solid #a7f3d0 !important;
}

.pantry-result-head {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.pantry-result-head img {
    display: block;
    width: 108px;
    height: 84px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--soft);
}

.pantry-result-head h2 {
    margin: 2px 0 3px;
}

.pantry-confirm-panel {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 2px;
    overflow: clip;
}

.pantry-confirm-panel > summary {
    display: flex;
    align-items: center;
    min-height: 58px;
    padding: 12px 14px;
    cursor: pointer;
    background: rgba(56, 189, 248, .06);
}

.pantry-confirm-panel > summary span,
.pantry-confirm-panel > summary small {
    display: block;
}

.pantry-confirm-panel > summary small {
    margin-top: 2px;
    color: var(--muted);
    font-weight: 500;
}

.pantry-recipe-form {
    padding: 16px;
    border-top: 1px solid var(--line);
}

.pantry-recipe-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 130px;
    line-height: 1.5;
}

.pantry-detected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.pantry-detected-chips .chip {
    border-radius: 2px !important;
}

.pantry-detected-chips small {
    color: var(--muted);
}

.pantry-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pantry-toggle-grid .checkbox-line {
    align-items: flex-start;
    min-height: 70px;
    padding: 11px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .015);
    border-radius: 2px !important;
}

.pantry-toggle-grid .checkbox-line span,
.pantry-toggle-grid .checkbox-line small {
    display: block;
}

.pantry-toggle-grid .checkbox-line small {
    margin-top: 3px;
    color: var(--muted);
}

.pantry-recipe-results {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.pantry-recipe-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-left: 4px solid #38bdf8;
    background: rgba(56, 189, 248, .035);
    border-radius: 2px;
}

.pantry-recipe-card:nth-of-type(3n+2) {
    border-left-color: #a7f3d0;
    background: rgba(167, 243, 208, .035);
}

.pantry-recipe-card:nth-of-type(3n+3) {
    border-left-color: #f2a36f;
    background: rgba(242, 163, 111, .035);
}

.pantry-recipe-card > header {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.pantry-recipe-card h3 {
    margin: 0 0 4px;
}

.pantry-recipe-card .pantry-macros {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 13px 0;
    border: 1px solid var(--line);
    background: var(--line);
}

.pantry-recipe-card .pantry-macros span {
    padding: 9px 8px;
    background: var(--panel, #111827);
    text-align: center;
    border-radius: 0 !important;
}

.pantry-fit-reason {
    margin: 12px 0;
    padding: 10px 12px;
    border-left: 3px solid #a7f3d0;
    background: rgba(167, 243, 208, .06);
}

.pantry-recipe-card details {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 2px;
}

.pantry-recipe-card details > summary {
    min-height: 46px;
    padding: 11px 12px;
    cursor: pointer;
    font-weight: 750;
}

.pantry-recipe-card details[open] > summary {
    border-bottom: 1px solid var(--line);
}

.pantry-ingredient-list,
.pantry-cooking-steps {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 12px 14px;
}

.pantry-ingredient-list {
    list-style: none;
}

.pantry-ingredient-list li {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: baseline;
}

.pantry-ingredient-list li.available > span {
    color: #a7f3d0;
}

.pantry-ingredient-list li.missing > span,
.pantry-ingredient-list li.missing > b {
    color: #f2a36f;
}

.pantry-ingredient-list small {
    color: var(--muted);
}

.pantry-cooking-steps {
    padding-left: 34px;
}

.pantry-cooking-steps li {
    padding-left: 4px;
    line-height: 1.45;
}

.pantry-missing,
.pantry-complete {
    margin: 0 12px 12px;
    padding: 9px 10px;
    border-radius: 2px;
}

.pantry-missing {
    background: rgba(242, 163, 111, .08);
    border: 1px solid rgba(242, 163, 111, .35);
}

.pantry-complete {
    background: rgba(167, 243, 208, .08);
    border: 1px solid rgba(167, 243, 208, .35);
    color: #a7f3d0;
}

.pantry-recipe-card > footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-top: 12px;
    color: var(--muted);
}

.pantry-recipe-card > footer small {
    margin-left: auto;
}

.pantry-delete-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.meal-photo-intro {
    margin-top: 22px;
    border-top: 3px solid #38bdf8 !important;
}

@media (max-width: 760px) {
    .photo-mode-grid,
    .pantry-toggle-grid {
        grid-template-columns: 1fr;
    }

    .photo-mode-card {
        min-height: 74px;
    }

    .pantry-flow-steps li {
        display: grid;
        justify-items: center;
        gap: 5px;
        padding: 8px 4px;
        text-align: center;
        font-size: 12px;
    }

    .pantry-result-head {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 11px;
    }

    .pantry-result-head img {
        width: 82px;
        height: 74px;
    }

    .pantry-result-head > .pill {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .pantry-recipe-card > header {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .pantry-recipe-card > header > .pill {
        grid-column: 2;
        justify-self: start;
    }

    .pantry-recipe-card .pantry-macros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pantry-ingredient-list li {
        grid-template-columns: 20px minmax(0, 1fr);
    }

    .pantry-ingredient-list small {
        grid-column: 2;
    }

    .pantry-recipe-card > footer small {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-height: 620px) and (max-width: 760px) {
    .pantry-recipe-form textarea {
        min-height: 88px;
    }
}
