﻿
/* font-family: 'Segoe UI', sans-serif; */

.ovs-form-group-custom { /* Questo è il contenitore -->  campo label + input */
    flex: 1 1 300px; /* min 300px, poi cresce   Legenda di 1 1 ---> può crescere e ridursi | 300px è la larghezza minima consigliata */
    display: flex; /* per disporre label e input uno accanto all’altro */
    align-items: center; /* per allinearli verticalmente */
    gap: 8px; /* spazio tra label e input */
    min-width: 0; /* evita bug nei layout con overflow */
}

.ovs-form-label-custom {
    flex: 0 0 150px; /*  la label avrà larghezza fissa di 120px, né cresce né si riduce */
    white-space: nowrap; /*  impedisce l’andata a capo */
    overflow: hidden; /**/
    text-overflow: ellipsis; /* se il testo è troppo lungo, viene troncato con se manca uno non va bene */
    text-align: right !important;
}

.ovs-form-input-custom {
    flex: auto; /* prende tutto lo spazio disponibile */
    min-width: 0; /* importante per farlo restringere correttamente se lo spazio è poco */
    max-height: 30px;
    font-size: 12px !important;
}

.ovs-desc-form-little {
    font-size: 12px;
}

@media (max-width: 550px) {
    .ovs-form-group-custom {
        flex-direction: column;
        align-items: stretch; /* fa sì che input e label prendano tutta la larghezza */
    }

    .ovs-form-label-custom {
        flex: none; /* override del 0 0 150px */
        width: 100%;
        white-space: normal; /* permette l'andata a capo */
        text-overflow: unset;
        overflow: visible;
    }

    .ovs-form-input-custom {
        width: 100%;
    }
}

/********************************* LINK PDF ********************************/
.ovs-file-item:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

.ovs-file-item a:hover {
    text-decoration: underline;
}

.ovs-btn-file-downl {
    font-size: 20px;
    color: white;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
}

    .ovs-btn-file-downl:hover {
        background-color: #0053ff;
    }

    .ovs-btn-file-downl:active {
        background-color: #009aff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }
/* Button status veichle */
.ovs-vehicle-status {
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #198754, #157347); /* tonalità verde elegante */
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, transform 0.2s ease;
}

    .ovs-vehicle-status:hover {
        background: linear-gradient(135deg, #157347, #11663b);
        transform: translateY(-1px);
    }

    .ovs-vehicle-status:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.4);
    }


    /*ACCORDION ITEM TEST*/

/*---------------------------------------------------*/
/* BUTTON RENTAL */
/* Contenitore principale dei tab */
.ovs-tab-content-custom {
    background-color: #fafbfc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    border-top-right-radius: 0px;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border: 1px solid #e1e6ea;
    border-bottom: none;
}

/* Tab link */
/*.nav-tabs .nav-link {*/
    /*color: #34495e;*/
    /*font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    border-radius: 0.3rem 0.3rem 0 0;
}

    .nav-tabs .nav-link:hover {
        background-color: #ecf0f1;
    }

    .nav-tabs .nav-link.active {
        background-color: #fafbfc;
        color: #ffffff;
    }*/

/* Riga di dati */
.ovs-data-row {
    margin-bottom: 2rem;
}

/* Colonna dei campi */
.ovs-data-col {
    margin-bottom: 1.5rem;
}

/* Badge contenente i valori */
.ovs-data-badge {
    color: #000000;
    font-size: 18px;
    background-color: #d6d9dc;
    text-overflow: ellipsis;
    padding: 1rem 1.25rem;
    font-weight: 500;
    display: inline-block;
    min-width: 100px;
    border-radius: 10px;
}

.ovs-form-st-label {
    color: #98acc1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-weight: bold;
    font-size: 14px;
}

.ovs-input-form-st-sm {
    border: none;
    border-radius: 12px;
    padding: 5px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 18px;
}

/* Responsive tweak */
@media (max-width: 768px) {
    .custom-input-container-Ax1 {
        /* padding: 12px; */
    }
}

/* Test style form input and labels end */


/* Test per intestazione form inizio */

/* title form */
.title-section {
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    color: #2c3e50; /* Blu scuro per un look professionale */
    transition: all 0.5s ease-in-out;
}

    .title-section::after {
        content: "";
        width: 100%;
        height: 3px;
        background: linear-gradient(to right, #3498db, #2c3e50); /* Gradiente blu */
        position: absolute;
        bottom: -2px;
        left: 0;
        transition: all 0.5s ease-in-out;
    }

    .title-section:hover {
        color: #2980b9; /* Cambia colore al passaggio */
    }

        .title-section:hover::after {
            height: 5px; /* Aumenta la spessore */
            width: 15px;
            background: linear-gradient(to right, #2c3e50, #3498db); /* Cambia direzione del gradiente */
        }

/* Test per intestazione form fine */

/* Textarea test style*/

.ovs-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    resize: vertical;
    border: none;
    border-radius: 8px;
    background-color: white;
    border: 1px solid #d1cfcf;
    color: black;
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

    .ovs-textarea::placeholder {
        color: black;
    }

    .ovs-textarea:focus {
        border-color: #6c63ff;
        outline: none;
        /*box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);*/
    }

.ovs-textarea-label {
    font-weight: 600;
    font-size: 12px;
    color: #828282;
}

/*Buttons visualize and download for cards allegati*/
.ovs-btn-visualize-file,
.ovs-btn-download-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    width: 100%;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: transparent;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Visualizza: bordi e colori personalizzati */
.ovs-btn-visualize-file {
    border-color: #007bff;
    color: #007bff;
}

/* Scarica: bordi e colori personalizzati */
.ovs-btn-download-file {
    border-color: #28a745;
    color: #28a745;
}

    /* Nasconde il testo all'hover */
    .ovs-btn-visualize-file:hover .label,
    .ovs-btn-download-file:hover .label {
        display: none;
    }

    /* Riduci padding per centratura perfetta su icona quando il testo sparisce */
    .ovs-btn-visualize-file:hover,
    .ovs-btn-download-file:hover {
        font-size: 20px;
    }

    /*  Input file style btn */

.ovs-file-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /*gap: 10px;*/
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #2c3e50;
    border: 2px dashed #3498db;
    border-radius: 12px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.1);
}

    /* Icona */
    .ovs-file-upload::before {
        content: '📁';
        font-size: 18px;
        transition: transform 0.3s ease;
    }

    /* Hover effect */
    .ovs-file-upload:hover {
        background: linear-gradient(135deg, #86cafc 0%, #bbdefb 100%);
        border: 2px solid #3498db;
        border-style: dashed;
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
        transform: translateY(-2px);
        color: #1a5276;
    }

        .ovs-file-upload:hover::before {
            transform: translateY(-2px) scale(1.1);
            content: '📂'; /* Cambia icona al hover */
        }

    /* Active/Drag over state */
    .ovs-file-upload.active,
    .ovs-file-upload:active,
    .ovs-file-upload.dragover {
        background: linear-gradient(135deg, #d6eaf8 0%, #aed6f1 100%);
        border: 2px solid #2980b9;
        border-style: solid;
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(41, 128, 185, 0.3) inset;
    }

    /* Focus state */
    .ovs-file-upload:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3), 0 4px 15px rgba(52, 152, 219, 0.2);
    }

    /* File selected state */
    .ovs-file-upload.has-file {
        background: linear-gradient(135deg, #d5f4e6 0%, #b8e0d2 100%);
        border: 2px solid #27ae60;
        border-style: dashed;
        color: #196f3d;
    }

        .ovs-file-upload.has-file::before {
            content: '✅';
            color: #27ae60;
        }

    /* Loading state */
    .ovs-file-upload.loading {
        background: linear-gradient(135deg, #fef9e7 0%, #fcf3cf 100%);
        border: 2px dashed #f39c12;
        color: #b9770e;
        cursor: wait;
    }

        .ovs-file-upload.loading::before {
            content: '⏳';
            animation: pulse 1.5s infinite;
        }

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Disabled state */
.ovs-file-upload:disabled {
    background: linear-gradient(135deg, #f2f3f4 0%, #e5e7e9 100%);
    border: 2px dashed #bdc3c7;
    color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

    .ovs-file-upload:disabled::before {
        content: '🔒';
        opacity: 0.6;
    }

/* Success state */
.ovs-file-upload.success {
    background: linear-gradient(135deg, #d4efdf 0%, #a9dfbf 100%);
    border: 2px solid #27ae60;
    color: #196f3d;
}

    /* end input file style btn */

#ovs-fileInput {
    display: none; /* nasconde l’input originale */
}

.ovs-file-name {
    margin-left: 10px;
    font-size: 14px;
    color: #555;
}

/* Button di upload all */

.ovs-btnUp {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 14px 28px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

    /* Hover */
    .ovs-btnUp:hover {
        background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
        color: white;
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4), 0 3px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

    /* Active */
    .ovs-btnUp:active {
        transform: translateY(1px);
        box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3), inset 0 1px 1px rgba(0, 0, 0, 0.1);
    }

    /* Ripple (ORA SU ::before) */
    .ovs-btnUp::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 5px;
        height: 5px;
        background: rgba(255, 255, 255, 0.5);
        opacity: 0;
        border-radius: 100%;
        transform: scale(1, 1) translate(-50%);
        transform-origin: 50% 50%;
    }

    .ovs-btnUp:focus:not(:active)::before {
        animation: ripple 2s ease-out;
    }

/* Ripple animation */
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }

    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }

    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

/* Focus outline */
.ovs-btnUp:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3), 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* LOADING STATE */
.ovs-btnUp.loading {
    pointer-events: none;
    opacity: 0.8;
    color: transparent;/* nasconde il testo */
}

    /* Spinner (SU ::after) */
    .ovs-btnUp.loading::after {
        content: "";
        width: 24px;
        height: 24px;
        border: 3px solid #fff;
        border-top-color: transparent;
        border-radius: 50%;
        animation: spinBB 0.8s linear infinite;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

/* Spinner anim */
@keyframes spinBB {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
