/* ============================================================================
   Demo INDA — UI conforme al layout Figma
   Sidebar sinistra scrollabile, tab testuali, swatch circolari, card grigie
   ============================================================================ */

:root {
    --inda-ink: #1a1a1a;
    --inda-gray: #b3b3b3;
    --inda-gray-light: #d9d9d9;
    --inda-card: #e3e3e3;
    --inda-rule: #1a1a1a;
}

body {
    background: #ffffff;
    color: var(--inda-ink);
}

/* ============================== HEADER ============================== */

header.inda-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    z-index: 1100;
    background: #ffffff;
    border-bottom: 1px solid #eee;
}

.inda-logo-img {
    height: 30px;
    width: auto;
}

.inda-actions {
    gap: 4px;
}

.inda-action {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: none;
    border: 0;
    color: var(--inda-ink);
    padding: 4px 10px;
    min-width: 52px;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.1;
}

    .inda-action i {
        font-size: 17px;
        line-height: 1;
    }

    .inda-action span {
        font-size: 8.5px;
        letter-spacing: 0.2px;
        color: #333;
    }

    .inda-action:hover {
        color: #000;
        background: #f5f5f5;
        border-radius: 4px;
    }

    .inda-action.active {
        background: #ececec;
        border-radius: 4px;
    }

/* ============================== LAYOUT ============================== */

.content-wrapper {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    overflow: hidden;
}

.canvas-container {
    flex: 1;
    position: relative;
    background-color: #ededed;
}

.page-content {
    width: 100%;
    height: 100%;
}

.ar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Sidebar sinistra SCROLLABILE */
.scroll-col-left {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 20px 40px 20px;
}

    .scroll-col-left::-webkit-scrollbar {
        width: 8px;
    }

    .scroll-col-left::-webkit-scrollbar-track {
        background: #f6f6f6;
    }

    .scroll-col-left::-webkit-scrollbar-thumb {
        background: #ccc;
        border-radius: 4px;
    }

        .scroll-col-left::-webkit-scrollbar-thumb:hover {
            background: #999;
        }

.offcanvas-body {
    height: 100%;
    overflow: hidden !important;
}

    .offcanvas-body .scroll-col-left {
        height: 100%;
    }

/* ======================= TITOLI E SEZIONI ======================= */

.inda-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

    .inda-title-row h1 {
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 26px;
        font-weight: 700;
        margin: 0;
        white-space: nowrap;
    }

.inda-section-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 10px 0;
}

    .inda-section-row .lbl {
        font-weight: 700;
        font-size: 14px;
        white-space: nowrap;
    }

    .inda-section-row.sub {
        margin: 12px 0 8px 24px;
    }

        .inda-section-row.sub .lbl {
            font-weight: 400;
            font-size: 13px;
        }

.inda-title-row .rule,
.inda-section-row .rule {
    flex: 1;
    height: 1px;
    background: var(--inda-rule);
}

/* ============================== TAB ============================== */

.inda-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 22px;
    margin-bottom: 10px;
}

    .inda-tabs.sub {
        margin-top: -4px;
    }

.inda-tab {
    font-size: 13px;
    color: var(--inda-gray);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

    .inda-tab:hover {
        color: #555;
    }

    .inda-tab.active {
        color: var(--inda-ink);
        font-weight: 700;
    }

    .inda-tab.disabled {
        color: var(--inda-gray-light);
        cursor: default;
        pointer-events: none;
    }

/* ======================== GRIGLIA PRODOTTI ======================== */

.inda-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 12px;
    margin-bottom: 6px;
}

.inda-card {
    width: 62px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

    .inda-card .ph {
        width: 62px;
        height: 62px;
        background: var(--inda-card);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: outline-color 0.15s ease;
        outline: 2px solid transparent;
        outline-offset: 1px;
        overflow: hidden;
    }

        .inda-card .ph img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            background: #fff;
        }

    .inda-card .cap {
        font-size: 11px;
        color: var(--inda-gray);
        line-height: 1.1;
    }

    /* card attiva (con modello): label scura */
    .inda-card.preview-item .cap,
    .inda-card.accessorio-item .cap {
        color: var(--inda-ink);
        font-weight: 700;
    }

    .inda-card.preview-item .ph,
    .inda-card.accessorio-item .ph {
        background: #d6d6d6;
    }

    .inda-card:hover:not(.disabled) .ph {
        outline-color: #999;
    }

    .inda-card.active .ph {
        outline-color: var(--inda-ink);
    }

    /* card disabilitata (senza modello) */
    .inda-card.disabled {
        cursor: default;
        pointer-events: none;
    }

        .inda-card.disabled .ph {
            background: #efefef;
        }

        .inda-card.disabled .cap {
            color: var(--inda-gray-light);
            font-weight: 400;
        }

.inda-card-none .ph {
    background: #f7f7f7 !important;
}

/* ====================== SELECT DIMENSIONI ====================== */

.inda-dims {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px 0;
}

    .inda-dims label {
        font-weight: 700;
        font-size: 13px;
        margin: 0;
    }

    .inda-dims select {
        width: 84px;
        border-radius: 0;
        border: 1px solid #999;
        font-size: 12px;
    }

/* ========================= SWATCH FINITURE ========================= */

.inda-swatches {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0 0 0;
    margin: 0 0 8px 0;
}

    .inda-swatches li {
        line-height: 0;
    }

    .inda-swatches .sw {
        display: inline-block;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background-color: var(--inda-card);
        background-size: cover;
        background-position: center;
        border: 1px solid rgba(0,0,0,0.08);
        transition: box-shadow 0.15s ease;
    }

    .inda-swatches a {
        display: inline-block;
        border-radius: 50%;
    }

        .inda-swatches a:hover .sw {
            box-shadow: 0 0 0 2px #999;
        }

        .inda-swatches a.active .sw {
            box-shadow: 0 0 0 2px var(--inda-ink);
        }

    .inda-swatches .sw.disabled {
        background-color: #ececec;
        border-color: transparent;
    }

/* ========================= SEZIONE TOP ========================= */

.inda-checks {
    display: flex;
    gap: 40px;
    margin: 4px 0 8px 0;
}

.inda-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin: 0;
}

    .inda-check input {
        width: 15px;
        height: 15px;
        border-radius: 0;
    }

    .inda-check.disabled {
        color: #999;
    }

/* ===================== HEADER PRODOTTO SELEZIONATO ===================== */

.inda-product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 8px 10px;
    margin-top: 14px;
}

    .inda-product-header #codiceProdotto {
        font-weight: 700;
        font-size: 13px;
    }

    .inda-product-header .acts {
        display: flex;
        gap: 2px;
    }

.inda-icon-btn {
    background: none;
    border: 0;
    color: #444;
    padding: 2px 5px;
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
}

    .inda-icon-btn:hover {
        color: #000;
        background: #e6e6e6;
        border-radius: 3px;
    }

    .inda-icon-btn.delete-object:hover {
        color: #c00;
    }

/* ============================ SIDEBAR ============================ */

@media (min-width: 768px) {
    #menuLeft {
        position: relative;
        width: 27%;
        max-width: 360px;
        min-width: 300px;
        height: 100%;
        border-right: 1px solid #e5e5e5;
        background-color: #ffffff;
    }

        #menuLeft.offcanvas-md {
            position: relative;
            flex-shrink: 0;
            transform: none !important;
            visibility: visible !important;
            background-color: transparent;
            border-right: 1px solid #e5e5e5;
            height: calc(100vh - 60px);
        }

            #menuLeft.offcanvas-md .offcanvas-body {
                padding: 0;
                height: 100%;
                overflow: visible !important;
            }

    .offcanvas-md.offcanvas-start {
        top: auto;
        bottom: auto;
    }

    .offcanvas-backdrop {
        display: none;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .canvas-container {
        width: 100%;
        height: 100%;
    }

    #menuLeft {
        width: 88%;
        max-width: 360px;
    }

        #menuLeft .offcanvas-body {
            height: 100%;
            overflow: hidden !important;
        }

    .inda-logo-img {
        height: 22px;
    }

    .inda-action {
        min-width: 40px;
        padding: 4px 6px;
    }

        .inda-action span {
            display: none;
        }
}

/* ==================== PRE-PAGINA DI BENVENUTO ==================== */

.welcome-inda {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: url('/ui/demoinda/images/bg.jpg') center / cover no-repeat #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

    /* velatura bianca sopra la foto, come nel layout */
    .welcome-inda::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.6);
    }

    .welcome-inda.hide {
        opacity: 0;
        pointer-events: none;
    }

.welcome-inda-logo {
    position: absolute;
    top: 28px;
    left: 28px;
    height: 54px;
    width: auto;
    z-index: 1;
}

.welcome-inda-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 520px;
    padding: 0 20px;
}

    .welcome-inda-content h1 {
        font-size: 34px;
        font-weight: 800;
        line-height: 1.15;
        color: #1d1d1d;
        margin: 0 0 12px;
    }

    .welcome-inda-content p {
        font-size: 16px;
        color: #1d1d1d;
        margin: 0 0 28px;
    }

/* CTA stile inda.net (app-generic-button): testo bold sulla linea,
   freccia assoluta a destra che scorre verso sinistra in hover */
.inda-cta {
    position: relative;
    display: block;
    width: 230px;
    height: 36px;
    margin: 0 auto;
    padding: 0 36px 0 15px;
    background: none;
    border: 0;
    border-bottom: 1px solid #000;
    font-size: 16px;
    font-weight: 700;
    line-height: 41px;
    color: #1d1d1d;
    text-align: left;
    cursor: pointer;
}

    .inda-cta svg {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 14px;
        height: 16px;
        fill: #1d1d1d;
        transition: 0.2s linear;
    }

    .inda-cta:hover svg {
        right: 22px;
    }

@media (max-width: 575.98px) {
    .welcome-inda-logo {
        top: 18px;
        left: 18px;
        height: 40px;
    }

    .welcome-inda-content h1 {
        font-size: 26px;
    }
}

/* ============================ VARIE ============================ */

.offcanvas {
    z-index: 1045;
}

.modal-backdrop {
    z-index: 2010;
}

.modal {
    z-index: 2020;
}

.swal2-container {
    z-index: 2030;
}

button:focus,
.btn:focus {
    outline: none;
}

/* SweetAlert2 QR Code styling */
.swal2-popup img.qr-code {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Print styles */
@media print {
    header,
    #menuLeft,
    .offcanvas {
        display: none !important;
    }

    .canvas-container {
        width: 100% !important;
        height: 100% !important;
        position: static !important;
    }
}
