﻿/* ========= Blazor defaults ========= */
#blazor-error-ui {
    background: #ffffe0;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: .6rem 1rem .7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: .75rem;
        top: .5rem;
    }

html, body {
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========= Container ========= */
.page-wrap {
    max-width: 720px;
    margin: 1rem auto;
    padding: 0 .75rem;
}

h3.mb-3 {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: .2px;
}

/* ========= Input bar ========= */
.input-bar {
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    overflow: hidden;
    padding: .5rem .75rem;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: auto 1fr 1rem;
    align-items: center;
    column-gap: .5rem;
}

    .input-bar .form-control {
        width: 100%;
        min-width: 0;
        border: none;
        box-shadow: none !important;
        background: transparent;
    }

.input-lg {
    font-size: 1.06rem;
    line-height: 1.4;
    padding: .55rem .25rem;
}

.btn-icon {
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

    .btn-icon i {
        font-size: 1.1rem;
        line-height: 1;
    }

/* ========= Table: single horizontal layout ========= */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    table-layout: auto;
}

    .table thead th {
        text-align: left;
        font-size: .875rem;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #6b7280;
        border: 0;
        padding: .25rem .75rem;
        background: #f8fafc;
    }

    .table tbody tr {
        background: #fff;
        border: 1px solid rgba(0,0,0,.06);
        box-shadow: 0 6px 16px rgba(0,0,0,.04);
        transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
    }

        .table tbody tr:hover {
            box-shadow: 0 10px 22px rgba(0,0,0,.06);
            transform: translateY(-1px);
        }

    .table tbody td {
        border: 0;
        padding: .75rem .75rem;
        vertical-align: middle;
        white-space: nowrap;
    }

    .table tbody tr > td:first-child {
        border-top-left-radius: 12px;
        border-bottom-left-radius: 12px;
    }

    .table tbody tr > td:last-child {
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
    }

    /* Remove any mobile "data-label" pseudo text everywhere */
    .table [data-label]::before {
        content: none !important;
        display: none !important;
    }

/* Click-to-toggle cursor */
.clickable-row {
    cursor: pointer;
}

/* Picked state: whole row green (cells included) */
.table tbody tr.picked,
.table tbody tr.picked > td,
.table tbody tr.picked > th {
    background-color: #e6ffe6 !important;
}

    .table tbody tr.picked > td,
    .table tbody tr.picked > th {
        border-color: #b7efb7 !important;
    }

tr.picked .item-name {
    text-decoration: line-through;
    opacity: .9;
}

.item-name {
    font-weight: 600;
    font-size: 1rem;
    color: #111827;
}

/* ========= Actions: always horizontal ========= */
.actions {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}

    .actions .btn {
        width: auto;
        min-width: 2.4rem;
        padding: .4rem .6rem;
        border-radius: 10px;
        font-weight: 500;
    }

/* Icon-only button sizing */
.btn-icon {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

    .btn-icon i {
        font-size: 1.1rem;
        line-height: 1;
    }

/* ========= Button tones ========= */
.btn-outline-secondary {
    border-color: #d1d5db;
}

    .btn-outline-secondary:hover {
        background: #eef2ff;
        border-color: #c7d2fe;
    }

.btn-outline-danger {
    border-color: #fecaca;
}

    .btn-outline-danger:hover {
        background: #fee2e2;
        border-color: #fca5a5;
    }

/* ========= Accessibility ========= */
:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

/* ========= Empty state ========= */
.text-muted {
    background: #f8fafc;
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
    padding: .85rem 1rem;
}

/* ========= Dark mode ========= */
@media (prefers-color-scheme: dark) {
    body {
        background: #0b1220;
        color: #eef2f7;
    }

    .input-bar, .table tbody tr {
        background: #0f172a;
        border-color: rgba(255,255,255,.06);
    }

    .table thead th {
        background: #111827;
        color: #9aa4b2;
    }

    .item-name {
        color: #e5e7eb;
    }

    .table tbody tr.picked,
    .table tbody tr.picked > td,
    .table tbody tr.picked > th {
        background-color: #123d12 !important;
        border-color: #1c5a1c !important;
    }

    .text-muted {
        background: #111827;
        border-color: #374151;
        color: #9aa4b2;
    }

    .btn-outline-secondary {
        color: #e5e7eb;
        border-color: #374151;
    }

        .btn-outline-secondary:hover {
            background: #1f2937;
            border-color: #475569;
        }

    .btn-outline-danger {
        color: #fecaca;
        border-color: #7f1d1d;
    }

        .btn-outline-danger:hover {
            background: #7f1d1d33;
            border-color: #b91c1c;
        }
}
