* { box-sizing: border-box; }
html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    word-break: break-word;
    overflow-wrap: break-word;
    top: 0 !important;
}

/* Nasconde la barra superiore invasiva di Google Translate mantenendo attiva la traduzione */
.goog-te-banner-frame.skiptranslate,
iframe.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-viewport {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    position: relative;
    word-break: break-word;
    overflow-wrap: break-word;
}

.box-note-content {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
}

.formatted-editor-box {
    min-height: 150px;
    max-height: 300px;
    overflow-y: auto;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    outline: none;
    word-break: break-word;
    overflow-wrap: break-word;
}

.formatted-editor-box:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2);
}

.formatting-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 0.75rem 0.75rem 0 0;
    border: 1px solid #d1d5db;
    border-bottom: none;
}

.formatting-toolbar button, 
.formatting-toolbar select, 
.formatting-toolbar input[type="color"] {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #1e3a8a;
    height: 32px;
    padding: 0 8px;
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.formatting-toolbar button { width: 32px; padding: 0; }
.formatting-toolbar button:hover, 
.formatting-toolbar select:hover {
    background: #dbeafe;
}

.safe-text-wrap {
    overflow: hidden;
    word-break: normal;
    overflow-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

.dropdown-container {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    z-index: 50;
    margin-top: 0.25rem;
}

.dropdown-menu.show {
    display: block;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #1e3a8a; border-radius: 3px; }

/* === CORREZIONE DEFINITIVA: Nasconde i prezzi generati da script.js === */
.text-emerald-800.font-black.bg-emerald-50 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
