/* ==========================================================================
   FONT LOCALE: INTER (400, 600) - Caricato dalla root
   ========================================================================== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../inter-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../inter-semibold.woff2') format('woff2');
}

/* ==========================================================================
   RESET E STILI CHATBOT
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #F8FAFC;
    height: 100dvh;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.chat-container {
    width: 100%;
    max-width: 600px;
    height: 100dvh;
    height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    position: relative;
}

@media (min-width: 768px) {
    .chat-container { 
        height: 90vh; 
        border-radius: 12px; 
        overflow: hidden; 
    }
    
    /* Resetta il padding della barra di digitazione su PC/Tablet */
    .chat-input-area {
        padding: 15px 20px !important;
    }
}

.chat-header {
    background-color: #0B2447;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    z-index: 10;
}

.header-info { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}

.bot-avatar {
    background: #FF6B35;
    width: 40px; 
    height: 40px;
    border-radius: 50%;
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.bot-avatar svg { 
    width: 24px; 
    height: 24px; 
    color: white; 
}

.chat-header h1 { 
    font-size: 1.1rem; 
    font-weight: 600; 
    margin-bottom: 2px; 
}

.chat-header .status { 
    font-size: 0.8rem; 
    color: #cbd5e1; 
}

.close-chat { 
    color: white; 
    font-size: 1.8rem; 
    text-decoration: none; 
    line-height: 1; 
}

.chat-window {
    flex: 1;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    background-color: #F8FAFC;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message { 
    max-width: 85%; 
    padding: 12px 16px; 
    border-radius: 12px; 
    font-size: 0.95rem; 
    line-height: 1.5; 
    animation: fadeIn 0.3s ease; 
}

@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.bot-message {
    background-color: white;
    color: #334155;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-message {
    background-color: #0B2447;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Contenitore Pulsanti Scelta Guidata */
.options-container {
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background-color: #F8FAFC;
    flex-shrink: 0;
}

.option-btn {
    background: white;
    border: 1px solid #FF6B35;
    color: #FF6B35;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover { 
    background: #FF6B35; 
    color: white; 
}

.chat-input-area {
    padding: 15px 20px 90px 20px; 
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 25px;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
}

.chat-input-area input:focus { 
    border-color: #0B2447; 
}

.chat-input-area input:disabled { 
    background: #f1f5f9; 
    cursor: not-allowed; 
}

.chat-input-area button {
    background: #FF6B35;
    color: white;
    border: none;
    width: 46px; 
    height: 46px;
    border-radius: 50%;
    display: flex; 
    justify-content: center; 
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-input-area button:hover { 
    background: #E85D2A; 
}

.chat-input-area button svg { 
    width: 20px; 
    height: 20px; 
}