﻿/* =====================================================
   SEZIONE 1 — CARD BASE
===================================================== */
.nbt-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    transition: transform .2s ease, box-shadow .2s ease;
    cursor: pointer;
}

    .nbt-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
    }

    .nbt-card img {
        width: 100%;
        border-radius: 8px;
        object-fit: cover;
        max-height: 180px;
    }

    .nbt-card h5 {
        font-weight: 600;
        color: var(--tertiary-color) !important;
        margin-top: 10px;
    }

    .nbt-card small {
        color: #555;
    }

    .nbt-card .row > .col div:first-child {
        font-weight: 400;
        color: #000;
    }

    .nbt-card .row > .col {
        line-height: 1.2;
    }

/* =====================================================
   SEZIONE 2 — OVERLAY E PANNELLO CONFIGURATORE
===================================================== */
#nbtOverlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadein 0.25s ease;
}

    #nbtOverlay.active {
        display: flex;
    }

#nbtConfigSection {
    position: relative;
    overflow: hidden;
    color: #f5f5f5;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
}

    #nbtConfigSection::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgba(10, 10, 10, 0.7);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 0;
    }

    #nbtConfigSection > * {
        position: relative;
        z-index: 1;
        filter: none;
        -webkit-filter: none;
    }

    /* Pulsanti primari */
    #nbtConfigSection .btn-primary {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #fff;
    }

        #nbtConfigSection .btn-primary:hover {
            background: rgba(255, 255, 255, 0.35);
        }

/* Pulsante chiusura */
#nbtCloseBtn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 44px;
    color: #fff;
    cursor: pointer;
}

/* =====================================================
   SEZIONE 3 — CARD INTERNA FLIP 3D
===================================================== */
.nbt-card-flip {
    position: relative;
    width: 100%;
    perspective: 1200px;
}

.nbt-card-inner {
    position: relative;
    width: 100%;
    min-height: 520px;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

    .nbt-card-inner.flipped {
        transform: rotateY(180deg) scale(1.02);
    }

.nbt-card-front,
.nbt-card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
}

.nbt-card-front {
    z-index: 2;
}

.nbt-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    box-shadow: none;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* =====================================================
   SEZIONE 4 — BOX TOTALE E TESTO
===================================================== */
#nbtTotaleBox {
    margin: 0 !important;
    padding: 20px !important;
    background: rgba(30, 30, 30, 0.85);
    color: #fff !important;
    font-weight: 400 !important;
    text-shadow: none;
    width: 100%;
    box-sizing: border-box;
}

    /* Prezzi riepilogo: giallo #ffd86b, peso 400 */
    #nbtTotaleBox b {
        color: #ffd86b !important;
        font-weight: 400 !important;
    }


    #nbtTotaleBox .text-warning {
        display: block;
        margin-top: 8px;
        padding: 10px 12px;
        background: rgba(255, 215, 100, 0.08);
        border-left: 3px solid #fff;
        border-radius: 4px;
        color: #ffd86b;
        font-weight: 400;
    }

    #nbtTotaleBox .text-secondary {
        display: block;
        margin-top: 8px;
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.05);
        border-left: 3px solid rgba(255, 255, 255, 0.2);
        border-radius: 4px;
        color: #bbb;
    }

    #nbtTotaleBox small {
        opacity: 0.9;
    }

/* Bottone back */
#nbtBackBtn {
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    font-size: 1rem;
    box-sizing: border-box;
}

/* =====================================================
   SEZIONE 5 — FORM E INPUT
===================================================== */
#nbtForm .form-label {
    font-weight: 500;
    color: #ddd;
    margin-bottom: 4px;
}

#nbtForm .form-control,
#nbtForm .form-check-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: background 0.3s, border 0.3s;
}

    #nbtForm .form-control:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.4);
        box-shadow: none;
    }

/* Checkbox */
#nbtForm input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s ease;
}

    #nbtForm input[type="checkbox"]:checked {
        background: #0d6efd;
        border-color: #0d6efd;
        box-shadow: 0 0 3px #0d6efd;
    }

#nbtForm .form-check-label {
    color: #ddd;
    cursor: pointer;
    user-select: none;
}

#nbtFranchigiaValue {
    color: #ffd86b;
}

/* =====================================================
   SEZIONE 6 — ELEMENTI ANIMAZIONI E STATO
===================================================== */
@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =====================================================
   SEZIONE 7 — RESPONSIVE
===================================================== */
@media (max-width: 768px) {
    #nbtConfigSection {
        padding: 20px 18px;
        max-width: 95%;
    }

    .riepilogo-periodo {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 8px;
    }

    #nbtTotaleBox {
        font-size: 0.9rem;
        padding: 15px;
        line-height: 1.4;
    }

        #nbtTotaleBox b {
            font-size: 1rem;
        }

    #nbtForm .form-control,
    #nbtForm .form-check-input {
        font-size: 0.9rem;
        padding: 6px 10px;
    }

    #nbtForm .btn-primary {
        width: 100%;
        font-size: 1rem;
        padding: 10px;
    }

    #nbtOverlay {
        align-items: center;
        justify-content: center;
        padding-top: 0;
    }
}
