﻿.tpvinput {
    display: block;
    width: 100%;
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem !important;
    font-family: inherit;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box !important;
    border: 1px solid #ced4da !important;
    appearance: none !important;
    border-radius: 0.375rem !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075) !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.tpvinput[type="file"] {
    overflow: hidden;
}

.tpvinput[type="file"]:not(:disabled):not([readonly]) {
    cursor: pointer;
}

    .tpvinput:focus {
        color: #212529;
        background-color: #fff;
        border-color: #86b7fe !important;
        outline: 0 !important;
        box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075), 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    }

.tpvinput::-webkit-date-and-time-value {
    min-width: 85px;
    height: 1.5em;
    margin: 0;
}

.tpvinput::-webkit-datetime-edit {
    display: block;
    padding: 0;
}

.tpvinput::placeholder {
    color: #6c757d;
    opacity: 1;
}

.tpvinput:disabled {
    color: #6c757d;
    background-color: #e9ecef;
    border-color: #ced4da;
    opacity: 1;
}

.tpvinput::file-selector-button {
    padding: 0.375rem 0.75rem;
    margin: -0.375rem -0.75rem;
    margin-inline-end: 0.75rem;
    color: #212529;
    background-color: #e9ecef;
    pointer-events: none;
    border-color: inherit;
    border-style: solid;
    border-width: 0;
    border-inline-end-width: 1px;
    border-radius: 0;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.tpvinput:hover:not(:disabled):not([readonly])::file-selector-button {
    background-color: #dde0e3;
}

/* Readonly controls as plain text */
.tpvinput-plaintext {
    display: block;
    width: 100%;
    padding: 0.375rem 0;
    margin-bottom: 0;
    line-height: 1.5;
    color: #212529;
    background-color: transparent;
    border: solid transparent;
    border-width: 1px 0;
}

.tpvinput-plaintext:focus {
    outline: 0;
}

.tpvinput-plaintext.tpvinput-sm,
.tpvinput-plaintext.tpvinput-lg {
    padding-right: 0;
    padding-left: 0;
}

/* Sizes */
.tpvinput-sm {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.tpvinput-sm::file-selector-button {
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
    margin-inline-end: 0.5rem;
}

.tpvinput-lg {
    min-height: calc(1.5em + 1rem + 2px);
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.5rem;
}

.tpvinput-lg::file-selector-button {
    padding: 0.5rem 1rem;
    margin: -0.5rem -1rem;
    margin-inline-end: 1rem;
}

/* Textareas */
textarea.tpvinput {
    min-height: calc(1.5em + 0.75rem + 2px);
}

textarea.tpvinput-sm {
    min-height: calc(1.5em + 0.5rem + 2px);
}

textarea.tpvinput-lg {
    min-height: calc(1.5em + 1rem + 2px);
}

/* Color input */
.tpvinput-color {
    width: 3rem;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem;
}

.tpvinput-color:not(:disabled):not([readonly]) {
    cursor: pointer;
}

.tpvinput-color::-moz-color-swatch {
    border: 0 !important;
    border-radius: 0.375rem;
}

.tpvinput-color::-webkit-color-swatch {
    border: 0 !important;
    border-radius: 0.375rem;
}

.tpvinput-color.tpvinput-sm {
    height: calc(1.5em + 0.5rem + 2px);
}

.tpvinput-color.tpvinput-lg {
    height: calc(1.5em + 1rem + 2px);
}


.tpvformlabel {
    color: var(--primary-color-negro);
}


/* TABS */

.tabs-container {
    display: flex;
    flex-wrap: wrap; /* 🔥 permite múltiples filas */
    gap: 0.25rem;
    padding: 0.5rem;
    background-color: transparent;
    border: none;
}


/* Tab genérica */
.tpvtab {
    display: flex;
    flex: 0 1 auto; /* permite que ocupen solo lo que necesiten */
    width: auto;
    min-width: 140px; /* mínimo razonable para icono + texto */
    max-width: 200px; /* opcional, si quieres limitar tamaño */
    text-align: center;
    gap: 5px;
    padding: 15px 15px;
    cursor: pointer;
    background-color: var(--primary-blanco);    
    color: var(--primary-color);
    border-bottom: 3px solid transparent;
    border: 1px solid var(--primary-color);
    transition: background-color 0.3s, color 0.3s;
    user-select: none;
    align-items: center;
    border-radius: 5px;
    /*transition: all 0.3s ease;*/
}

    /* Tab activa */
    .tpvtab.selected {
        background-color: var(--primary-color);
        color: var(--primary-color);
        border: 1px solid transparent;
        border-bottom: 3px solid var(--primary-color);
        z-index: 1;
    }

    /* Icono en la pestaña */
    .tpvtab i {
        vertical-align: middle;
    }
    
    /* Etiqueta de la pestaña */
   .tpvtab .tab-label {
        font-size: 1rem;
        font-weight: 500;
    }


/* Panel asociado */
.tab-panel {
    display: none;
    padding: 1rem;
    border: 5px solid #F5F5F5;
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    background-color: white;
    margin-top: -5px; /* encaja visualmente con el borde del tab */
}

.insidetab {
    border: 1px solid #E6E9EC;
    border-radius: 8px;
    padding: 5px;
    padding-top: 14px !important;
}

.seltab.selected .insidetab {
    background-color: var(--primary-color);
    color: white;
    border-bottom: 2px solid #0277bd;
}

/* Modo minimizado */
.tabs-container.tabs-container-minim .tpvtab span {
    display: none; /* oculta todos los textos */
}

/* EXCEPCIÓN: el tab activo sí muestra texto */
.tabs-container.tabs-container-minim .tpvtab.selected span {
    /*display: inline; */
    display: none;
}

/* Opcional: ajustar padding para tabs solo icono */
.tabs-container.tabs-container-minim .tpvtab {
    min-width: auto;
    padding: 0.5rem;
}
/* Opcional: ajustar padding para tabs solo icono */
.tabs-container.tabs-container-minim .tpvtab.selected {
    background-color: var(--primary-color);
    color: var(--primary-color-blanco);
}

/* Opcional: centrar icono cuando no hay texto */
.tabs-container.tabs-container-minim .tpvtab i {
    margin-right: 0;
}

.tpvtab[title] {
    position: relative;
}



/* COMBO-LIST PERSONALIZADAS (PARA SUBSTITUIR LOS DATA-LIST EN IOS)*/

.combo-container {
    position: relative;
    width: 100%;
}

.combo-list {
    display: none; /* Oculto por defecto */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 180px; /* Ajusta esto según el espacio libre sobre el teclado */
    overflow-y: auto; /* ¡Esta es la clave para ver las 12 opciones! */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    z-index: 9999;
    margin: 4px 0 0 0;
    padding: 0;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

    .combo-list li {
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 16px; /* Evita que Safari haga zoom al tocar en iOS */
        cursor: pointer;
    }

        /* Feedback visual al tocar la pantalla */
        .combo-list li:active {
            background-color: #e6f7ff;
        }



.input-wrapper {
    position: relative;
    display: inline-block;
    width: 250px;
}

    .input-wrapper input {
        width: 100%;
        padding-right: 40px; /* Espacio para el icono */
        box-sizing: border-box;
    }

    .input-wrapper .material-icons {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: auto;
        cursor: pointer;
        color: #666;
    }