/* /Shared/ComponentiUI/Input/InpStd.razor.rz.scp.css */
/* =========================================================
   InpStd.razor.css  (CSS con scope: Blazor lo compila in
   PV5.Client.styles.css, quindi in index.html serve il link
   a PV5.Client.styles.css e NON a inpstd.css)

   REGOLE DELLO SCOPE
   - L'attributo di scope viene aggiunto agli elementi disegnati
     da InpStd.razor e alla radice dei componenti figli (Select,
     Button, FormItem...).
   - Gli elementi INTERNI ai componenti Ant (.ant-input, .ant-picker,
     .ant-select-selector, .ant-form-item-*) NON hanno lo scope:
     per colpirli serve ::deep dopo l'elemento che ha lo scope.
   ========================================================= */


/* ---------------------------------------------------------
   SELECT / COMBO
   --------------------------------------------------------- */
.inpstd-cmb[b-2rb5wkkg1n]  .ant-select-selector {
    color: var(--pv5-blu, #295290) !important;
    background-color: lightsteelblue;
    font-size: medium;
}

.inpstd-cmb[b-2rb5wkkg1n]  .ant-select-selection-placeholder {
    font-size: medium;
    color: var(--pv5-blu, #295290) !important;
}

.inpstd-cmb[b-2rb5wkkg1n]  .ant-select-selection-item {
    font-size: medium;
    color: var(--pv5-blu, #295290) !important;
}


/* ---------------------------------------------------------
   INPUT / TEXT / COLORI STANDARD
   (.inpdat = nome usato oggi nel markup, compatibilita)
   --------------------------------------------------------- */
.inpstd-input[b-2rb5wkkg1n],
.inpdat[b-2rb5wkkg1n] {
    height: var(--pv5-h-input, 30px);
    color: var(--pv5-blu, #295290) !important;
    background-color: white;
}

.inpstd-textarea[b-2rb5wkkg1n] {
    width: 100%;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    font-size: 14px;
    color: var(--pv5-blu, #295290) !important;
}

/* Colore testo dei controlli Ant solo dentro InpStd */
.inpstd-item[b-2rb5wkkg1n]  .ant-input,
.inpstd-item[b-2rb5wkkg1n]  .ant-picker-input > input,
.inpstd-cmb[b-2rb5wkkg1n]  .ant-select-selection-item {
    color: var(--pv5-blu, #295290) !important;
}

/* Larghezza piena: elementi disegnati da InpStd */
.inpstd-input[b-2rb5wkkg1n],
.inpdat[b-2rb5wkkg1n],
.inpstd-textarea[b-2rb5wkkg1n],
.inpstd-cmb[b-2rb5wkkg1n] {
    width: 100% !important;
}

    /* Larghezza piena: elementi interni di Ant */
    .inpstd-item[b-2rb5wkkg1n]  .ant-picker,
    .inpstd-cmb[b-2rb5wkkg1n]  .ant-select-selector {
        width: 100% !important;
    }

.inpstd-item[b-2rb5wkkg1n]  .ant-form-item-control,
.inpstd-item[b-2rb5wkkg1n]  .ant-form-item-control-input,
.inpstd-item[b-2rb5wkkg1n]  .ant-form-item-control-input-content {
    width: 100% !important;
}


/* ---------------------------------------------------------
   CAMPI DISABILITATI
   --------------------------------------------------------- */

/* Elementi disegnati da InpStd */
.inpstd-input:disabled[b-2rb5wkkg1n],
.inpdat:disabled[b-2rb5wkkg1n],
.inpstd-num-int:disabled[b-2rb5wkkg1n],
.inpstd-num-dec:disabled[b-2rb5wkkg1n],
.inpstd-ten-input:disabled[b-2rb5wkkg1n],
.inpstd-ten-inp:disabled[b-2rb5wkkg1n],
.inpstd-textarea:disabled[b-2rb5wkkg1n] {
    color: var(--pv5-blu, #295290) !important;
    -webkit-text-fill-color: var(--pv5-blu, #295290) !important;
    opacity: 1 !important;
    background-color: var(--pv5-disabled-fondo, #f5f5f5);
}

/* Elementi interni di Ant */
.inpstd-item[b-2rb5wkkg1n]  .ant-input-disabled,
.inpstd-item[b-2rb5wkkg1n]  .ant-input[disabled] {
    color: var(--pv5-blu, #295290) !important;
    -webkit-text-fill-color: var(--pv5-blu, #295290) !important;
    opacity: 1 !important;
    background-color: var(--pv5-disabled-fondo, #f5f5f5);
}


/* ---------------------------------------------------------
   LABEL STANDARD (LBL / LBLMULTI)
   --------------------------------------------------------- */
.inpstd-label[b-2rb5wkkg1n] {
    width: 100%;
    box-sizing: border-box;
    color: var(--pv5-blu, #295290) !important;
    text-align: left;
}

.inpstd-label--multi[b-2rb5wkkg1n] {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
    color: var(--pv5-blu, #295290) !important;
    text-align: left;
}

.inpstd-label--center[b-2rb5wkkg1n] {
    text-align: center;
}

.inpstd-label--right[b-2rb5wkkg1n] {
    text-align: right;
}

.inpstd-label--left[b-2rb5wkkg1n] {
    text-align: left;
}

.inpstd-label--warn[b-2rb5wkkg1n],
.inpstd-label--multi.inpstd-label--warn[b-2rb5wkkg1n] {
    background: var(--pv5-warn-fondo, #fff7ed);
    border: 1px solid var(--pv5-warn-bordo, #fdba74);
    border-radius: var(--pv5-raggio, 8px);
}


/* ---------------------------------------------------------
   LABEL DEL FORMITEM
   --------------------------------------------------------- */
.inpstd-item[b-2rb5wkkg1n]  .ant-form-item-label {
    text-align: left !important;
}

    .inpstd-item[b-2rb5wkkg1n]  .ant-form-item-label > label {
        width: 100%;
        justify-content: flex-start !important;
        text-align: left !important;
        color: var(--pv5-blu, #295290) !important;
        font-size: 1rem !important;
    }

        /* asterisco campo obbligatorio */
        .inpstd-item[b-2rb5wkkg1n]  .ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
            font-size: large !important;
            color: var(--pv5-rosso, #cc0000) !important;
            line-height: 1 !important;
        }


/* ---------------------------------------------------------
   NUMERICI (NUM / INPDBL / INPPRZ)
   Nomi vecchi (enterR, no-spin, inpstdnum-int) mantenuti
   per compatibilita finche il markup non viene rinominato.
   --------------------------------------------------------- */
.inpstd-enter-right[b-2rb5wkkg1n],
.enterR[b-2rb5wkkg1n] {
    text-align: right;
}

.inpstd-num-wrapper[b-2rb5wkkg1n] {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    width: 100%;
}

    .inpstd-num-wrapper .inpstd-num-int[b-2rb5wkkg1n],
    .inpstd-num-wrapper .inpstd-num-dec[b-2rb5wkkg1n] {
        min-width: 0;
        color: var(--pv5-blu, #295290) !important;
    }

.inpstd-num-sep[b-2rb5wkkg1n] {
    flex: 0 0 auto;
    color: var(--pv5-blu, #295290) !important;
}

/* nasconde le freccette (Chrome/Edge) */
.inpstd-no-spin[b-2rb5wkkg1n]::-webkit-outer-spin-button,
.inpstd-no-spin[b-2rb5wkkg1n]::-webkit-inner-spin-button,
.no-spin[b-2rb5wkkg1n]::-webkit-outer-spin-button,
.no-spin[b-2rb5wkkg1n]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* nasconde le freccette (Firefox) */
.inpstd-no-spin[type="number"][b-2rb5wkkg1n],
.no-spin[type="number"][b-2rb5wkkg1n] {
    -moz-appearance: textfield;
}


/* ---------------------------------------------------------
   COMBO / INPTEN / PASSWORD
   --------------------------------------------------------- */
.inpstd-cmb-wrapper[b-2rb5wkkg1n] {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inpstd-cmb-add-btn[b-2rb5wkkg1n],
.inpstd-cmb-search-toggle-btn[b-2rb5wkkg1n] {
    margin-left: 4px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.inpstd-ten-wrapper[b-2rb5wkkg1n] {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inpstd-ten-input[b-2rb5wkkg1n],
.inpstd-ten-inp[b-2rb5wkkg1n] {
    flex: 0 0 80px;
    color: var(--pv5-blu, #295290) !important;
}

.inpstd-ten-cmb[b-2rb5wkkg1n] {
    flex: 1 1 auto;
}

.inpstd-pwd-wrap[b-2rb5wkkg1n],
.pwd-wrap[b-2rb5wkkg1n] {
    display: flex;
    align-items: center;
    gap: 4px;
}

.inpstd-pwd-eye[b-2rb5wkkg1n],
.pwd-eye[b-2rb5wkkg1n] {
    height: var(--pv5-h-input, 30px);
    width: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ---------------------------------------------------------
   RADIO BUTTON (RB / RBC)
   --------------------------------------------------------- */
.inpstd-rb-wrap[b-2rb5wkkg1n] {
    width: 100%;
    box-sizing: border-box;
    color: var(--pv5-blu, #295290) !important;
}

    .inpstd-rb-wrap.inpstd-rb-wrap--v[b-2rb5wkkg1n]  .ant-radio-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .inpstd-rb-wrap.inpstd-rb-wrap--h[b-2rb5wkkg1n]  .ant-radio-group {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
        align-items: center;
    }

    .inpstd-rb-wrap.inpstd-rb-wrap--box[b-2rb5wkkg1n] {
        border: 1px solid #d9d9d9;
        border-radius: var(--pv5-raggio, 8px);
        padding: 10px 12px;
        background: #fff;
    }

    .inpstd-rb-wrap.inpstd-rb-wrap--dis[b-2rb5wkkg1n] {
        opacity: 0.85;
    }

.inpstd-rb-item--vert[b-2rb5wkkg1n] {
    display: block;
    margin-bottom: 6px;
}

.inpstd-rb-item--oriz[b-2rb5wkkg1n] {
    display: inline-block;
    margin-right: 20px;
}


/* ---------------------------------------------------------
   CMBR / RICERCA
   --------------------------------------------------------- */
.inpstd-cmb-search-wrapper[b-2rb5wkkg1n] {
    margin-top: 6px;
}

.inpstd-ricerca[b-2rb5wkkg1n] {
    border: 2px solid var(--pv5-blu, #295290) !important;
    border-radius: 6px;
    background-color: #f0f7ff;
}

    .inpstd-ricerca[b-2rb5wkkg1n]  input:focus {
        border-color: var(--pv5-oro, #ffd700) !important;
        box-shadow: 0 0 6px var(--pv5-oro, #ffd700);
    }


/* ---------------------------------------------------------
   EVIDENZIAZIONE SU FOCUS
   --------------------------------------------------------- */
.inpstd-item--focus[b-2rb5wkkg1n] {
    background-color: #f0f7ff;
    border-radius: 6px;
}

    /* ::deep copre sia gli input semplici sia quelli interni ad Ant */
    .inpstd-item--focus[b-2rb5wkkg1n]  input {
        border-color: #1677ff !important;
        box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2) !important;
    }

    .inpstd-item--focus[b-2rb5wkkg1n]  .ant-input,
    .inpstd-item--focus[b-2rb5wkkg1n]  .ant-select-selector,
    .inpstd-item--focus[b-2rb5wkkg1n]  .ant-picker {
        border-color: #1677ff !important;
        box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2) !important;
    }


/* ---------------------------------------------------------
   LBL2 (etichetta + dato)
   --------------------------------------------------------- */
.inpstd-lbl2[b-2rb5wkkg1n] {
    display: flex;
    align-items: center;
    gap: 6px;
}

.inpstd-lbl2__dat[b-2rb5wkkg1n] {
    font-weight: 600;
    color: #262626;
    font-size: 15px;
}


/* ---------------------------------------------------------
   BOTTONI ICONA ACCANTO ALLE COMBO
   --------------------------------------------------------- */
.inpstd-btn-icon[b-2rb5wkkg1n] {
    background-color: var(--pv5-blu, #295290) !important;
    width: 40px;
    height: 32px;
    margin-left: 4px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.inpstd-btn-icon__glyph[b-2rb5wkkg1n] {
    color: var(--pv5-oro, #ffd700) !important;
    font-size: 18px;
}


/* ---------------------------------------------------------
   LISTA CHECKBOX (CLB)
   --------------------------------------------------------- */
.inpstd-clb-linea[b-2rb5wkkg1n] {
    width: 100% !important;
    display: block !important;
    white-space: nowrap !important;
    text-align: left !important;
    overflow-x: auto;
}

.inpstd-clb-item[b-2rb5wkkg1n] {
    display: inline-block !important;
    width: auto !important;
    margin-right: 20px;
    text-align: left !important;
    vertical-align: middle;
}
