/* ---------- container ---------- */

.left-region {
    flex: 0 0 var(--left-region-width);
    width: var(--left-region-width);
    background: var(--color-left-bg);
    padding: 24px 20px 40px;
    box-sizing: border-box;
    overflow-y: auto;
}

.left-region-backdrop {
    display: none;
}

/* ---------- mobile hamburger drawer ---------- */

@media (max-width: 768px) {
    .left-region {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(var(--left-region-width), 85vw);
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
    }

    .left-region.left-region-open {
        transform: translateX(0);
    }

    .left-region-backdrop.left-region-backdrop-visible {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 49;
    }
}

/* ---------- korpa + odjava (samo mobilni, vidi Assembly LeftRegion.razor) ---------- */

.left-region-mobile-actions {
    display: none;
}

@media (max-width: 768px) {
    .left-region-mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 28px;
    }

    .left-region-mobile-actions .top-cart,
    .left-region-mobile-actions .top-logout {
        width: 100%;
        box-sizing: border-box;
        height: auto;
        justify-content: flex-start;
    }

    .left-region-mobile-actions .top-user-menu {
        margin: 0;
    }
}

.left-section-title {
    margin: 0 0 12px;
    font-size: var(--font-size-small);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--color-text);
}

/* ---------- logo ---------- */

.left-logo {
    margin-bottom: 28px;
}

.left-logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- navigation ---------- */

.left-nav {
    margin-bottom: 28px;
}

.left-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.left-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: var(--font-size-base);
}

.left-nav-item:hover {
    color: var(--color-accent);
}

.left-nav-icon {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-block;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.left-nav-icon-parts {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 17h14M5 17a2 2 0 1 0 4 0M5 17a2 2 0 1 1 4 0m6 0a2 2 0 1 0 4 0m-4 0a2 2 0 1 1 4 0M5 17l1.5-6h11L19 17M7 11l1-4h8l1 4'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 17h14M5 17a2 2 0 1 0 4 0M5 17a2 2 0 1 1 4 0m6 0a2 2 0 1 0 4 0m-4 0a2 2 0 1 1 4 0M5 17l1.5-6h11L19 17M7 11l1-4h8l1 4'/></svg>");
}

.left-nav-icon-oil {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2s6 7 6 12a6 6 0 1 1-12 0c0-5 6-12 6-12z'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2s6 7 6 12a6 6 0 1 1-12 0c0-5 6-12 6-12z'/></svg>");
}

.left-nav-icon-body {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='8' width='18' height='9' rx='2'/><path d='M3 13h18M7 8V6a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='8' width='18' height='9' rx='2'/><path d='M3 13h18M7 8V6a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2'/></svg>");
}

.left-nav-icon-battery {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='7' width='18' height='10' rx='2'/><path d='M22 10v4M9 12h4M6 7V5M12 7V5'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='7' width='18' height='10' rx='2'/><path d='M22 10v4M9 12h4M6 7V5M12 7V5'/></svg>");
}

.left-nav-icon-wiper {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 21V9m0 0a5 5 0 0 0 5-5H7a5 5 0 0 0 5 5z'/><circle cx='12' cy='21' r='1'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 21V9m0 0a5 5 0 0 0 5-5H7a5 5 0 0 0 5 5z'/><circle cx='12' cy='21' r='1'/></svg>");
}

.left-nav-icon-spray {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 2h4v3H9zM8 5h6l2 4v13H6V9z'/><path d='M15 8h4M16 5h3M17 11h3'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 2h4v3H9zM8 5h6l2 4v13H6V9z'/><path d='M15 8h4M16 5h3M17 11h3'/></svg>");
}

.left-nav-icon-tools {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.7 6.3a4 4 0 0 0-5.4 5.4L2 19l3 3 7.3-7.3a4 4 0 0 0 5.4-5.4l-2.8 2.8-2-2z'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14.7 6.3a4 4 0 0 0-5.4 5.4L2 19l3 3 7.3-7.3a4 4 0 0 0 5.4-5.4l-2.8 2.8-2-2z'/></svg>");
}

.left-nav-icon-box {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m21 8-9-5-9 5 9 5 9-5zM3 8v8l9 5 9-5V8M12 13v8'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m21 8-9-5-9 5 9 5 9-5zM3 8v8l9 5 9-5V8M12 13v8'/></svg>");
}

.left-nav-icon-chart {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='20' x2='18' y2='10'/><line x1='12' y1='20' x2='12' y2='4'/><line x1='6' y1='20' x2='6' y2='14'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='20' x2='18' y2='10'/><line x1='12' y1='20' x2='12' y2='4'/><line x1='6' y1='20' x2='6' y2='14'/></svg>");
}

.left-nav-icon-doc {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><path d='M14 2v6h6M9 13h6M9 17h6'/></svg>");
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><path d='M14 2v6h6M9 13h6M9 17h6'/></svg>");
}

/* ---------- vehicle search history ---------- */

.left-history {
    margin-top: 28px;
}

.left-history-status {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    background: var(--color-left-card);
    border-radius: var(--radius-card);
}

.left-history-list {
    background: var(--color-left-card);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.left-history-item {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: transparent;
    color: var(--color-primary);
    font-family: inherit;
    font-weight: 700;
    font-size: var(--font-size-small);
    line-height: 1.4;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.left-history-item:last-child {
    border-bottom: none;
}

.left-history-item:hover {
    color: var(--color-accent);
}

/* ---------- assembly search + tree ---------- */

.assembly-search {
    margin-top: 28px;
}

.assembly-search-box {
    position: relative;
    margin-bottom: 12px;
}

.assembly-search-box input {
    width: 100%;
    height: 44px;
    padding: 0 36px 0 16px;
    border: none;
    border-radius: var(--radius-card);
    background: var(--color-surface);
    font-size: var(--font-size-base);
    color: var(--color-text);
    outline: none;
    box-sizing: border-box;
}

.assembly-search-chevron {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    pointer-events: none;
    background-color: var(--color-text-muted);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat center / contain;
}

.assembly-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    z-index: 10;
}

.assembly-search-result {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    color: var(--color-text);
    font-family: inherit;
    font-size: var(--font-size-small);
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.assembly-search-result:last-child {
    border-bottom: none;
}

.assembly-search-result:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-accent);
}

.assembly-search-no-results {
    padding: 12px 16px;
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    text-align: center;
}

.assembly-reset {
    display: inline-block;
    margin-bottom: 12px;
    border: none;
    background: none;
    padding: 0;
    color: var(--color-primary);
    font-size: var(--font-size-small);
    text-decoration: underline;
}

.assembly-tree {
    background: var(--color-left-card);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.assembly-tree-status {
    padding: 16px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    background: var(--color-left-card);
    border-radius: var(--radius-card);
}

.assembly-node {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.assembly-node:last-child {
    border-bottom: none;
}

.assembly-node-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: none;
    background: none;
    padding: 12px 16px;
    text-align: left;
    font-size: var(--font-size-small);
    font-weight: 700;
    color: var(--color-text);
}

.assembly-node-icon {
    flex: 0 0 auto;
    min-width: 22px;
    text-align: center;
    color: var(--color-primary);
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
}

.assembly-node-children {
    padding-left: 16px;
}

.assembly-node-children .assembly-node-toggle {
    font-weight: 400;
}

.assembly-node-leaf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    font-size: var(--font-size-small);
    color: var(--color-text);
    cursor: pointer;
}

.assembly-node-leaf input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}
