@import './components/cartsheet.css';

html, body {
    height: 100%;
    overflow-x: hidden;
}

    body.no-scroll {
        overflow: hidden;
    }

/* LIST ITEM */
.pwa-card {
    display: flex;
    min-height: 100px;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: #fff;
    cursor: pointer;
}

    .pwa-card:last-child {
        border-bottom: none;
    }

/* IMAGE */
.item-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}

/* CONTENT */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.desc {
    font-weight: 600;
    font-size: 15px;
}

.itemno, .qty  {
    font-size: 12px;
    color: #666;
}

.price {
    font-size: 12px;
}

.category {
    font-size: 12px;
    color: #999;
}

/* BOTTOM */
.bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ADD BUTTON */
.add-btn {
    background: var(--theme-primary, #0F172A);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
}

/* STEPPER */
.stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: blue;
    color: white;
    border-radius: 5px;
    padding: 4px 10px;
}

    .stepper button {
        background: none;
        border: none;
        color: white;
        font-size: 18px;
    }

/* LAYOUT */
.app-layout {
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ✅ TOP BAR (FIXED VISIBILITY) */
.top-bar {
    flex-shrink: 0;
    background: #0F172A;
    color: #FFFFFF;
}

    /* force all content inside to be visible */
    .top-bar * {
        color: #FFFFFF;
    }

    /* icons */
    .top-bar i,
    .top-bar .bi {
        color: #FFFFFF;
        font-size: 1.4rem;
    }

    /* optional muted text (like subtitle/location detail) */
    .top-bar .muted {
        color: rgba(255,255,255,0.7);
    }

/* CONTENT AREA */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 70px;
    background: #f9fafb; /* subtle modern background */
}

.pwa-btn {
    transition: transform 0.1s ease, opacity 0.1s ease;
    min-height: 100px;
    gap: 12px;
    padding: 12px;
    font-size: 1.1rem;
    background: #fff;
    border-radius: 0;
    /* 🔥 force override bootstrap */
    border: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}

    /* remove last divider */
    .pwa-btn:last-child {
        border-bottom: none !important;
    }
    .pwa-btn:active {
        background: #f3f4f6;
    }
/* Prevent overlap */
.main-content {
    padding-bottom: 70px;
}

/* ✅ BOTTOM BAR */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #0F172A;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 99999;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translateZ(0);
}

/* NAV BUTTONS */
.nav-btn {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: rgba(255,255,255,0.7);
}

    .nav-btn.active {
        color: #3B82F6;
    }

    .nav-btn:active {
        opacity: 0.6;
    }

/* CART BUTTON (UNCHANGED) */
.cart-btn {
    background: black;
    color: white;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* TOAST */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: #111;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

    .toast.show {
        opacity: 1;
    }

    .toast.success {
        background: #16a34a;
    }

    .toast.error {
        background: #dc2626;
    }

/* GLOBAL */
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #e4e1e1;
}

/* VALIDATION */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

/* ERROR UI */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* LOADING */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }
