/* OpenSmartBot - Modal Responsive & Accessibile */

/* MODALE BASE */
.opensmartbot-modal {
    display: none;
    position: fixed !important;
    bottom: 120px !important;
    right: 50px !important;
    width: 360px !important;
    height: auto !important;
    min-height: 300px !important;
    background: #fff !important;
    border: 1px solid #ccc !important;
    padding: 24px !important;
    z-index: 999999 !important;
    box-shadow: 0 0 15px rgba(0,0,0,0.3) !important;
    font-family: Arial, sans-serif !important;
    font-size: 15px !important;
    color: #000 !important;
    overflow-y: auto !important;
    border-radius: 12px !important;
    max-width: 96vw !important;
}

/* FORM CONSENSO */
#opensmartbot-consent-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#opensmartbot-email {
    display: block !important;
    width: 100% !important;
    padding: 12px !important;
    font-size: 16px !important;
    border: 1px solid #ccc !important;
    box-sizing: border-box !important;
    background-color: #fff !important;
    color: #000 !important;
    border-radius: 6px !important;
    margin-bottom: 10px !important;
    transition: border-color 0.2s;
}
#opensmartbot-email:focus {
    outline: none !important;
    border-color: #0074d9 !important;
}

#opensmartbot-start-chatbot {
    padding: 12px 18px !important;
    background-color: #0073aa !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    font-size: 16px !important;
    transition: background 0.2s;
    margin-top: 6px !important;
}
#opensmartbot-start-chatbot:disabled {
    background: #b3d8ff !important;
    color: #fff !important;
    cursor: not-allowed !important;
}

/* MESSAGGI DI ERRORE E INFO */
#opensmartbot-message {
    margin-bottom: 10px !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

/* PRIVACY LINK BEN EVIDENZIATO */
.opensmartbot-privacy-link {
    color: #0074d9 !important;
    font-weight: bold !important;
    text-decoration: underline wavy !important;
    cursor: pointer !important;
    background: linear-gradient(90deg, #e6f0fa 0%, #b3d8ff 100%);
    border-radius: 4px;
    padding: 2px 4px;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px 0 rgba(0,116,217,0.07);
    display: inline-block;
}
.opensmartbot-privacy-link:visited {
    color: #005fa3 !important;
}
.opensmartbot-privacy-link:hover, 
.opensmartbot-privacy-link:focus {
    color: #fff !important;
    background: linear-gradient(90deg, #0074d9 0%, #005fa3 100%);
    text-decoration: underline wavy !important;
    outline: none;
}

/* LABELS E CHECKBOX */
.opensmartbot-modal label {
    font-size: 15px !important;
    margin-top: 10px !important;
    margin-bottom: 4px !important;
    display: block !important;
    cursor: pointer;
}
#opensmartbot-privacy-checkbox {
    margin-right: 7px !important;
    accent-color: #0074d9;
}

/* RESPONSIVE DESIGN */
@media (max-width: 700px) {
    .opensmartbot-modal {
        width: 98vw !important;
        right: 1vw !important;
        left: 1vw !important;
        min-width: unset !important;
        padding: 14px !important;
        font-size: 16px !important;
        max-width: 99vw !important;
        bottom: 70px !important;
    }
}

@media (max-width: 480px) {
    .opensmartbot-modal {
        width: 99vw !important;
        min-width: unset !important;
        max-width: 99vw !important;
        left: 0.5vw !important;
        right: 0.5vw !important;
        bottom: 16vw !important;
        padding: 10px !important;
        font-size: 17px !important;
        border-radius: 8px !important;
    }
    #opensmartbot-email,
    #opensmartbot-start-chatbot {
        font-size: 18px !important;
        padding: 13px !important;
    }
}

/* ACCESSIBILITÀ: FOCUS BEN VISIBILE */
.opensmartbot-modal *:focus-visible {
    outline: 2px solid #0074d9 !important;
    outline-offset: 2px !important;
}

/* UTILITY: PULSANTE FISSO */
#opensmartbot-button {
    /* Non serve qui ma lasciato per coerenza */
}