﻿/* ===========================
   DEFINIZIONE DEI TRE TEMI
   =========================== */

/* TEMA ORANGE (default) */
.theme-orange {
    --primary: #FF6600; /* colore principale arancione */
    --secondary: #FFCEAE; /* colore secondario / highlight */
    --text-light: #FFFFFF; /* testo chiaro */
    --text-dark: #000000; /* testo scuro */
    --input-border: #cccccc; /* bordo input */
    --input-focus-shadow: rgba(102,175,233,.6); /* focus input */
    --chat-bg: #fff8f0; /* sfondo box chat */
    --chat-border: #e0b280; /* bordo box chat */
    --chat-btn-hover: #e06500; /* hover bottone chat */
    --status-online: yellowgreen; /* stato online */
    --status-offline: orange; /* stato offline */
    --status-offline-alt: gray; /* stato offline alternativo */
    --btn-disabled: #cccccc; /* bottone disabilitato */
    --background: white; /* sfondo generale */
    --popup-background: white;
    --popup-border: #FF6600;
    --link-color: blue;
    --text-area: white;
    --shadow: rgba(0,0,0,0.15);
}

/* TEMA PURPLE */
.theme-purple {
    --primary: #A40071; /* colore principale purple */
    --secondary: #FFCEAE; /* colore secondario / highlight */
    --text-light: #FFFFFF; /* testo chiaro */
    --text-dark: #000000; /* testo scuro */
    --input-border: #cccccc; /* bordo input */
    --input-focus-shadow: rgba(102,175,233,.6); /* focus input */
    --chat-bg: #fff8f0; /* sfondo box chat */
    --chat-border: #e0b280; /* bordo box chat */
    --chat-btn-hover: #e06500; /* hover bottone chat */
    --status-online: yellowgreen; /* stato online */
    --status-offline: orange; /* stato offline */
    --status-offline-alt: gray; /* stato offline alternativo */
    --btn-disabled: #cccccc; /* bottone disabilitato */
    --background: white; /* sfondo generale */
    --popup-background: white;
    --popup-border: #A40071;
    --link-color: blue;
    --text-area: white;
    --shadow: rgba(0,0,0,0.15);
}

/* TEMA BLUE */
.theme-blue {
    --primary: #007ACC; /* colore principale blu */
    --secondary: #99CCFF; /* colore secondario / highlight */
    --text-light: #FFFFFF; /* testo chiaro */
    --text-dark: #000000; /* testo scuro */
    --input-border: #cccccc; /* bordo input */
    --input-focus-shadow: rgba(0,122,204,.6); /* focus input */
    --chat-bg: #f0f8ff; /* sfondo box chat */
    --chat-border: #80b3ff; /* bordo box chat */
    --chat-btn-hover: #005fa3; /* hover bottone chat */
    --status-online: lightgreen; /* stato online */
    --status-offline: #005fa3; /* stato offline */
    --status-offline-alt: gray; /* stato offline alternativo */
    --btn-disabled: #cccccc; /* bottone disabilitato */
    --background: white; /* sfondo generale  */
    --popup-background: white;
    --popup-border: #007ACC;
    --link-color: blue;
    --text-area: white;
    --shadow: rgba(0,0,0,0.15);
}

/* TEMA GREEN */
.theme-green {
    --primary: #28A745; /* colore principale verde */
    --secondary: #A8E6A2; /* colore secondario / highlight */
    --text-light: #FFFFFF; /* testo chiaro */
    --text-dark: #000000; /* testo scuro */
    --input-border: #cccccc; /* bordo input */
    --input-focus-shadow: rgba(40,167,69,.6); /* focus input */
    --chat-bg: #f0fff4; /* sfondo box chat */
    --chat-border: #90ee90; /* bordo box chat */
    --chat-btn-hover: #218838; /* hover bottone chat */
    --status-online: yellowgreen; /* stato online */
    --status-offline: #218838; /* stato offline */
    --status-offline-alt: gray; /* stato offline alternativo */
    --btn-disabled: #cccccc; /* bottone disabilitato */
    --background: white; /* sfondo generale  */
    --popup-background: white;
    --popup-border: #28A745;
    --link-color: blue;
    --text-area: white;
    --shadow: rgba(0,0,0,0.15);
}

/* TEMA DARK ORANGE */
.theme-dark {
    --primary: #FF8C1A; /* arancione brillante */
    --secondary: #FFB366; /* arancione chiaro per hover / highlight */
    --text-light: #000000; /* testo bianco */
    --text-dark: #FFFFFF; /* per bottoni chiari */
    --input-border: #444444; /* bordo input leggero */
    --input-focus-shadow: rgba(255,140,26,0.5); /* glow arancione al focus */
    --chat-bg: #242424; /* box chat */
    --chat-border: #FF8C1A; /* bordo chat visibile */
    --chat-btn-hover: #CC7000; /* hover più scuro */
    --status-online: #33CC33; /* verde acceso */
    --status-offline: #999999; /* grigio chiaro */
    --status-offline-alt: #555555;
    --btn-disabled: #555555; /* disabilitato */
    --background: #242424; /* sfondo generale scuro */
    --popup-background: #4D4D4D;
    --popup-border: white;
    --link-color: #FFAB57;
    --text-area: #D5D5D5;
    --shadow: rgba(0,0,0,0.15);
}

/* TEXTBOX e PASSWORD  */
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
    border: 1px solid var(--input-border) !important;
    border-radius: 4px;
    padding: 6px 8px;
    height: 25px; /* forza altezza uniforme */
    box-sizing: border-box;
    background-color: var(--text-area);
    outline: none;
}
body {
    background-color: var(--background);
    color: var(--text-dark);
    transition: background 0.3s ease, color 0.3s ease;
}

/* Effetto fade+zoom per l’intera pagina */
/* --- Animazione fade + zoom per tutte le pagine --- */

    /* FOCUS sugli input */
    input[type="text"]:focus,
    input[type="password"]:focus,
    input[type="email"]:focus,
    textarea:focus {
        border-color: var(--primary) !important;
        box-shadow: 0 0 4px var(--input-focus-shadow);
    }

/* DROPDOWNLIST */
select {
    border: 1px solid var(--input-border) !important;
    border-radius: 4px;
    min-width: 150px; /* così non restano troppo strette */
    height: 30px; /* altezza allineata con textbox */
    padding: 2px 4px; /* padding ridotto per non “gonfiare” */
    background-color: var(--text-area);
    outline: none;
}

/* MODAL POPUP */
.modal-Status {
    position: absolute;
    text-align: center;
    background: var(--popup-background);
    opacity: 0.90;
    padding: 15px;
    margin: 0 auto;
    border: 2px solid var(--popup-border);
    border-radius: 20px;
    float: left;
    left: 70%;
    top: 70%;
    transform: translate(-50%, -50%);
    z-index: 80000;
}

.modal {
    position: absolute;
    text-align: center;
    background: var(--popup-background);
    opacity: 0.90;
    padding: 15px;
    margin: 0 auto;
    border: 2px solid var(--popup-border);
    border-radius: 20px;
    width: max-content;
    height: max-content;
    float: left;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 80000;
}

    /* FOCUS sulla select */
    select:focus {
        border-color: var(--primary) !important;
        box-shadow: 0 0 4px var(--input-focus-shadow);
    }

body {
}

.arrow-button::after {
    content: " \25BC"; /* Freccia verso il basso */
    font-size: 12px;
    margin-left: 5px;
}

.arrow1-button::after {
    content: " \25B2"; /* Freccia verso il basso */
    font-size: 12px;
    margin-left: 5px;
}

.color-link {
    color: var(--link-color) !important;
}

/* ================================
       FOR Default page ANIMATIONS
   ================================*/
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-5px);
    transition: 0.3s ease;
    box-shadow: 0 4px 14px var(--shadow);
}

/* ------------------------
       HERO SECTION
    -------------------------*/
.hero {
    background: var(--primary);
    color: var(--text-light);
    padding: 40px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

    .hero img {
        height: 80px;
    }

/* -------------------------
       SERVICES GRID
   -------------------------*/
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

    .services-grid .card {
        position: relative; /* <<< fondamentale */
        overflow: hidden; /* per evitare glitch */
    }

        .services-grid .card .btn-ButtonStd {
            position: absolute;
            right: 15px;
            bottom: 15px;
            opacity: 0;
            transition: opacity 0.25s ease-in-out;
        }

        .services-grid .card:hover .btn-ButtonStd {
            opacity: 1;
        }

.card {
    background: var(--popup-background);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px var(--shadow);
    border: none;
    transition: 0.3s ease;
}

    .card h4 {
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--primary);
        margin-bottom: 10px;
    }

.about-box {
    position: relative;
    padding-bottom: 70px; /* spazio per il bottone */
}

    .about-box .btn-ButtonStd {
        position: absolute;
        right: 15px;
        bottom: 15px;
        opacity: 0;
        transform: scale(0.9);
        transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
        pointer-events: none; /* evita clic mentre è invisibile */
    }

    /* Hover → mostra + zoom morbido */
    .about-box:hover .btn-ButtonStd {
        opacity: 1;
        transform: scale(1);
        pointer-events: auto;
    }
/* ------------------------
       SEZIONE CHI SONO
    -------------------------*/
.about-box {
    margin-top: 40px;
    padding: 30px;
    background: var(--popup-background);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
}

/* ------------------------
       CLIENTI
    -------------------------*/
.clients-box {
    margin-top: 40px;
    padding: 30px;
    background: var(--popup-background);
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
}

/* ------------------------
       CONTATTI
    -------------------------*/
.contact-box {
    background: var(--popup-background);
    padding: 30px;
    border-radius: 10px;
    margin-top: 40px;
    text-align: center;
    box-shadow: 0 2px 8px var(--shadow);
}

/* ------------------------
       FOOTER
    -------------------------*/
footer {
    margin-top: 50px;
    padding: 20px;
    background: var(--primary);
    color: var(--text-dark);
    text-align: center;
    border-radius: 10px;
}

/* Dark mode toggle button */
.dark-toggle {
    cursor: pointer;
    float: right;
    font-size: 22px;
}

/* ------------------------
       FADE & ZOOM pages 1
    -------------------------*/

.zoom-label {
    opacity: 0;
    transform: scale(0);
}

.start-zoom {
    animation: zoomIn 0.6s ease-out forwards;
    animation-delay: 1s;
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}
/* ================================
       FOR others pages
   ================================*/

.hdr01 {
    top: 0px;
    text-decoration: none;
    height: 50px;
}

.hdr02 {
    position: relative;
    top: 1px;
    text-decoration: none;
    margin-left: 10px;
    height: 50px;
    font-family: Calibri, Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: var(--text-light);
}

.hdr03 {
    width: 40px;
    height: 40px;
}

.hdr04 {
    top: 0px;
    text-decoration: none;
    height: 78px;
    font-family: Calibri, Arial, sans-serif;
    font-size: 14px;
    color: var(--text-light);
    font-weight: bold;
    background-color: var(--primary);
}

.hdr05 {
    top: 0px;
    text-decoration: none;
    height: 77px;
}

.hdr06 {
    width: 40px;
    height: 40px;
    margin-top: 0px;
}

.btn-ButtonImg {
    width: 49px;
    height: 65px;
    cursor: pointer;
}

    .btn-ButtonImg:disabled {
        cursor: not-allowed;
    }

.btn-ButtonStd {
    width: 100px;
    height: 30px;
    text-align: center;
    background-color: var(--primary);
    color: var(--text-light);
    font-size: 11pt;
    border-color: var(--primary);
    border-radius: 20px;
    font-weight: bold;
    right: 100px;
    cursor: pointer;
}

    .btn-ButtonStd:disabled {
        cursor: not-allowed;
    }

.btn-ButtonStdReverse {
    width: 100px;
    height: 30px;
    text-align: center;
    background-color: var(--text-light);
    color: var(--primary);
    font-size: 11pt;
    border-color: var(--primary);
    border-width: 1px;
    border-radius: 20px;
    font-weight: bold;
    right: 100px;
    cursor: pointer;
}

    .btn-ButtonStdReverse:disabled {
        cursor: not-allowed;
    }

.btn-Button {
    width: 200px;
    height: 30px;
    text-align: center;
    background-color: var(--primary);
    color: var(--text-light);
    font-size: 11pt;
    border-color: var(--primary);
    border-radius: 20px;
    right: 100px;
    cursor: pointer;
}

    .btn-Button:disabled {
        cursor: not-allowed;
    }

.btn-ButtonBigSize {
    width: 170px;
    height: 40px;
    text-align: center;
    background-color: var(--primary);
    color: var(--text-light);
    font-size: 13pt;
    border-color: var(--primary);
    border-radius: 20px;
    font-weight: bold;
    right: 100px;
    cursor: pointer;
}

    .btn-ButtonBigSize:disabled {
        cursor: not-allowed;
    }

.grd-Table {
    font-family: Calibri, Arial, sans-serif;
    font-size: 11pt;
    border-style: none;
    height: 30px;
}

.grd-HeaderStyle {
    background-color: var(--primary);
    border-style: none;
    font-weight: normal;
    font-family: Calibri, Arial, sans-serif;
    font-size: 11pt;
    color: var(--text-light);
}

.grd-HeaderStyle1 th {
    position: sticky;
    top: 0;
    background-color: var(--primary);
    border-style: none;
    font-weight: bold;
    font-family: Calibri, Arial, sans-serif;
    font-size: 12pt;
    color: var(--text-light);
    z-index: 500;
}

.grd-FooterStyle {
    background-color: var(--primary);
    border-style: none;
    font-weight: bold;
    font-family: Calibri, Arial, sans-serif;
    font-size: 12pt;
    color: var(--text-light);
}

.pnl-Header {
    position: absolute;
    background-color: var(--primary);
    border-style: none;
    font-weight: normal;
    font-family: Calibri, Arial, sans-serif;
    font-size: 11pt;
    color: var(--text-light);
    top: 200px;
    width: 1830px;
}

.tbl-Tab01 {
    border-bottom: 1px solid var(--primary);
    vertical-align: top;
}

.td-Box {
    border: 1px solid var(--primary);
    vertical-align: top;
}

.lbl-Int1 {
    text-align: center;
    background-color: var(--primary);
    color: var(--text-light);
    font-size: 14pt;
    font-family: Calibri, Arial, sans-serif;
    border-color: var(--primary);
    font-weight: bold;
}

.lbl-Title {
    border-style: none;
    font-weight: bold;
    font-family: Calibri, Arial, sans-serif;
    font-size: 20pt;
    color: var(--primary);
}

.lbl-TitleBlink {
    border-style: none;
    font-weight: bold;
    font-family: Calibri, Arial, sans-serif;
    font-size: 20pt;
    color: var(--primary);
    animation: blinkAnim 1s step-start infinite;
}

@keyframes blinkAnim {
    50% {
        visibility: hidden;
    }
}

.lbl-Body {
    border-style: none;
    font-weight: normal;
    font-family: Calibri, Arial, sans-serif;
    font-size: 11pt;
    text-align: justify;
}

.grd-RowStyle {
    line-height: 15px;
}

.btn-ButtonMultiView {
    width: 100px;
    height: 30px;
    text-align: center;
    background-color: var(--primary);
    color: white;
    font-size: 11pt;
    border-color: var(--primary);
    font-weight: bold;
    right: 100px;
    cursor: pointer;
}

    .btn-ButtonMultiView:disabled {
        cursor: not-allowed;
    }

.grd-SelectedRow {
    background-color: var(--secondary);
    border-style: none;
    font-style: italic;
    color: black;
}

.lbl-Normal {
    font-weight: normal;
    font-family: Calibri, Arial, sans-serif;
    font-size: 11pt;
    text-align: justify;
}

.txt-ReadOnly {
    font-weight: bold;
    font-family: Calibri, Arial, sans-serif;
    font-size: 11pt;
    text-align: justify;
    background-color: whitesmoke;
    border-color: whitesmoke;
}

.txt-Highlighted {
    font-weight: bold;
    font-family: Calibri, Arial, sans-serif;
    font-size: 15pt;
    text-align: justify;
    color: var(--primary);
}

.lbl-TitleSmall {
    border-style: none;
    font-weight: bold;
    font-family: Calibri, Arial, sans-serif;
    font-size: 12pt;
    color: var(--text-light);
}

.badge {
    position: absolute;
    top: -20px;
    left: -20px;
    background-color: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    padding: 9px 6px;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    z-index: 10;
    min-width: 30px;
    text-align: center;
}
/* ================================
   CHAT CONTROL - Stile comune
   ================================ */

/* Bottone flottante */
.chatButton {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary); /* colore tema arancione */
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease;
    z-index: 89999;
    pointer-events: auto !important;
}

@keyframes lampeggioNotifica {
    0% {
        background-color: var(--primary);
        color: var(--text-light);
    }

    50% {
        background-color: #FF0000;
        color: yellow;
    }

    100% {
        background-color: var(--primary);
        color: var(--text-light);
    }
}

.chatButton.nuovoMessaggio {
    animation: lampeggioNotifica 0.8s ease-in-out infinite;
    box-shadow: 0 0 15px var(--primary);
    font-weight: bold;
}
/* Tremolio lento e limitato */
.chatButton:hover {
    animation: shake 0.6s ease-in-out 0s 5;
    background-color: var(--chat-btn-hover);
}

/* Tremolio */
@keyframes shake {
    0% {
        transform: translate(0px, 0px);
    }

    20% {
        transform: translate(-3px, 0px);
    }

    40% {
        transform: translate(3px, 0px);
    }

    60% {
        transform: translate(-3px, 0px);
    }

    80% {
        transform: translate(3px, 0px);
    }

    100% {
        transform: translate(0px, 0px);
    }
}

/* Bottone attivo quando arriva un messaggio */
.chatButton.active {
    background-color: #ff4d00;
}

/* Box chat */
#chatBox {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 570px;
    background-color: var(--chat-bg);
    border: 1px solid var(--chat-border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    flex-direction: column;
    overflow: hidden;
    z-index: 89998;
    pointer-events: all;
}

/* Header chat */
#chatHeader {
    background-color: var(--primary);
    color: var(--text-light);
    padding: 10px;
    font-weight: bold;
    text-align: center;
}

#chatHeader {
    background: var(--primary);
    color: var(--text-light);
    padding: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    text-align: center;
    font-weight: bold;
}

#listaUtenti {
    height: 33vh;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 5px;
    border-bottom: 1px solid var(--input-border);
}

    #listaUtenti li {
        padding: 5px;
        cursor: pointer;
        border-radius: 5px;
    }

        #listaUtenti li:hover {
            background: #f0f0f0;
        }

#chat {
    height: 33vh;
    overflow-y: auto;
    padding: 5px;
    border-bottom: 1px solid var(--input-border);
    font-size: 13px;
}
/* Messaggi chat */
#chatMessages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 14px;
}

/* Area input */
#chatInput {
    display: flex;
    border-top: 1px solid var(--chat-border);
}

    #chatInput input {
        flex: 1;
        padding: 8px;
        border: none;
        outline: none;
    }

    #chatInput button {
        background-color: var(--primary);
        color: var(--text-light);
        border: none;
        padding: 8px 12px;
        cursor: pointer;
    }

#btnInvia {
    display: flex;
    align-items: center; /* centra verticalmente */
    justify-content: center; /* centra orizzontalmente */
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 12pt;
    font-family: Ravie;
    margin-left: 8px;
}

    #btnInvia:hover {
        background: var(--primary);
    }

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%; /* pallino rotondo */
    margin-right: 6px;
    vertical-align: middle;
    background-color: var(--status-offline-alt); /* colore offline */
}

    .status-dot.online {
        background-color: var(--status-online); /* colore online */
    }

    .status-dot.offline {
        background-color: var(--status-offline); /* o un altro colore quando offline */
    }

@keyframes lampeggioMessaggi {
    0%, 100% {
        background-color: var(--text-light);
        color: var(--primary);
    }

    50% {
        background-color: var(--text-light);
        color: var(--text-light);
    }
}

#Btn_Messages.BlinkMessage {
    animation: lampeggioMessaggi 1s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.8);
}

#destinatario {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}
