/* ==========================================================================
   Reset & Stili Globali
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #F0F2F5; /* Grigio chiaro per lo sfondo generale */
    color: #374151; /* Grigio scuro per il testo principale */
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #1ABC9C; /* Verde acqua per i link */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
a:hover {
    color: #16A085; /* Verde acqua più scuro per hover */
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    color: #2C3E50; /* Blu scuro per i titoli */
    line-height: 1.3;
}

/* ==========================================================================
   Layout Principale della Suite (Header, Main, Footer)
   ========================================================================== */
.suite-header {
    background-color: #2C5282; /* Blu scuro corporate */
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    position: sticky; /* Mantiene l'header in alto durante lo scroll */
    top: 0;
    z-index: 1000;
}
.suite-header .logo {
    height: 40px;
    width: auto;
}
.suite-nav a.nav-link {
    color: #ECF0F1; /* Grigio chiaro per i link nav */
    margin-left: 15px;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}
.suite-nav a.nav-link:hover {
    background-color: #34495E; /* Blu leggermente più chiaro per hover */
    color: #FFFFFF;
}
.suite-nav a.nav-link.active {
    background-color: #1ABC9C;
    color: #FFFFFF;
    font-weight: 600;
}

.suite-main-content {
    flex-grow: 1;
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    width: 95%; /* Leggermente più stretto per schermi grandi */
}

.suite-footer {
    text-align: center;
    padding: 25px 20px;
    background-color: #ECF0F1; /* Grigio chiaro per il footer */
    color: #7F8C8D; /* Grigio medio per testo footer */
    font-size: 14px;
    border-top: 1px solid #D5DBDB; /* Separatore sottile */
}

/* ==========================================================================
   Sezioni Contenuto Moduli
   ========================================================================== */
.module-content-section, .hero-section, .start-analysis-section, .settings-section, .modules-grid-section {
    background-color: #FFFFFF;
    padding: 25px 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.module-header { /* Header interno ai moduli */
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #EAECEE;
}
.module-header h1 {
    font-size: 24px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.module-header h1 i { /* Icone Lucide nei titoli */
    width: 28px; height: 28px;
    color: #1ABC9C; /* Icone verdi */
}
.module-header p {
    font-size: 15px;
    color: #566573;
}

/* ==========================================================================
   Elementi Form Comuni
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #34495E;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-group label i { width: 16px; height: 16px; opacity: 0.7; }

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #CCD1D1; /* Grigio più morbido per i bordi */
    border-radius: 6px;
    font-size: 15px;
    background-color: #FDFEFE;
    color: #374151;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input[type="file"] {
    padding: 8px 10px; /* Adattamento per input file */
    background-color: #F8F9F9;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1ABC9C;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.25);
}
.form-group textarea {
    min-height: 100px;
    resize: vertical;
}
.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #7F8C8D;
}

/* ==========================================================================
   Pulsanti
   ========================================================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s ease-out, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.btn i { width: 18px; height: 18px; }

.btn-primary {
    background-color: #1ABC9C;
    color: white;
    box-shadow: 0 2px 4px rgba(22, 160, 133, 0.2);
}
.btn-primary:hover {
    background-color: #16A085;
    box-shadow: 0 3px 6px rgba(22, 160, 133, 0.3);
    transform: translateY(-1px);
}
.btn-secondary {
    background-color: #3498DB; /* Blu per azioni secondarie */
    color: white;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}
.btn-secondary:hover {
    background-color: #2980B9;
    box-shadow: 0 3px 6px rgba(52, 152, 219, 0.3);
    transform: translateY(-1px);
}
.btn-large {
    padding: 14px 28px;
    font-size: 16px;
}
.btn:active {
    transform: translateY(0px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.btn:disabled {
    background-color: #BDC3C7; /* Grigio per disabilitato */
    color: #7F8C8D;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ==========================================================================
   Stili Specifici per Pagina Home (index.html)
   ========================================================================== */
.hero-section { text-align: center; }
.hero-section h1 { font-size: 36px; font-weight: 800; margin-bottom: 15px; }
.hero-section p { font-size: 18px; max-width: 700px; margin-left: auto; margin-right: auto; }

.start-analysis-section { text-align: center; }
.start-analysis-section .form-group { max-width: 500px; margin-left:auto; margin-right:auto; text-align: left; }
.start-analysis-section .info-text { font-size: 14px; color: #7F8C8D; margin-top:15px; }

.modules-grid-section h2 { font-size: 22px; text-align: center; margin-bottom: 25px; }
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.module-card {
    background-color: #FFFFFF;
    border: 1px solid #EAECEE;
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.module-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.1);
}
.module-card i {
    color: #1ABC9C;
    margin-bottom: 15px;
    width: 36px; height: 36px; /* Icone più grandi nelle card */
}
.module-card h3 { font-size: 18px; color: #34495E; margin-bottom: 8px; font-weight: 600; }
.module-card p { font-size: 14px; color: #566573; line-height: 1.5; }

/* ==========================================================================
   Stili per Tabs (es. property_data_extractor.html)
   ========================================================================== */
.tabs-container {
    background-color: #FDFEFE;
    padding: 20px;
    border-radius: 8px;
    /* box-shadow: 0 1px 2px rgba(0,0,0,0.05); */ /* Ombreggiatura leggera se necessario */
}
.tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 2px solid #EAECEE;
    overflow-x: auto;
    padding-bottom: 5px; /* Spazio per la linea attiva */
}
.tab-link {
    padding: 10px 18px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-size: 15px;
    font-weight: 500;
    color: #566573;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 5px; /* Spazio tra i tab */
}
.tab-link:hover { color: #1ABC9C; }
.tab-link.active {
    color: #1ABC9C;
    border-bottom-color: #1ABC9C;
    font-weight: 600;
}
.tab-content { display: none; padding-top: 10px; animation: fadeInTab 0.4s ease-out; }
.tab-content.active { display: block; }
@keyframes fadeInTab { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   Output Boxes, Placeholders, Map, Lists (per moduli specifici)
   ========================================================================== */
.map-container { /* Usato in context_analyzer.html */
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #EAECEE; /* Sfondo per placeholder */
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.map-container.placeholder {
    display: flex; justify-content: center; align-items: center;
    color: #7F8C8D; font-style: italic;
}

.results-list, .ai-output-box, .data-summary-box, .report-content-box {
    background-color: #F8F9F9;
    border: 1px solid #E0E0E0;
    padding: 20px;
    min-height: 150px;
    border-radius: 8px;
    color: #4A5568; /* Grigio scuro per testo leggibile */
    font-size: 15px;
    line-height: 1.7;
    margin-top: 20px;
}
.results-list.placeholder, .ai-output-box.placeholder, .data-summary-box.placeholder, .report-content-box.placeholder {
    border-style: dashed;
    border-color: #BDC3C7;
    color: #7F8C8D;
    font-style: italic;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.ai-output-box pre, .data-summary-box pre { /* Per JSON formattato */
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 14px;
}
.ai-output-box h3, .ai-output-box h4, .ai-output-box h5 { /* Titoli nell'output AI */
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #2C3E50;
}
.ai-output-box ul { margin-left: 20px; margin-bottom: 1em; }
.ai-output-box li { margin-bottom: 0.3em; }
.ai-output-box .error-text { color: #E74C3C; font-weight: 500; }

.poi-list { list-style: none; padding-left: 0; }
.poi-list li { padding: 8px 0; border-bottom: 1px dotted #E0E0E0; font-size: 14px; }
.poi-list li:last-child { border-bottom: none; }
.poi-list .tag-brand, .poi-list .tag-local {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    margin-right: 8px;
    color: white;
    text-transform: uppercase;
}
.poi-list .tag-brand { background-color: #E74C3C; } /* Rosso per brand */
.poi-list .tag-local { background-color: #7F8C8D; } /* Grigio per locale */

/* Image Preview (marketing_description_generator.html) */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
}
.image-preview-item {
    position: relative;
    border: 1px solid #CCD1D1;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: #F8F9F9;
}
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-item .remove-img-btn {
    position: absolute; top: 5px; right: 5px;
    background-color: rgba(231, 76, 60, 0.8); /* Rosso semi-trasparente */
    color: white; border: none; border-radius: 50%;
    width: 22px; height: 22px; font-size: 12px; line-height: 22px;
    text-align: center; cursor: pointer; transition: background-color 0.2s;
}
.image-preview-item .remove-img-btn:hover { background-color: #C0392B; }

/* Report Page (full_report.html) */
.report-viewer .report-section { margin-bottom: 35px; }
.report-viewer .report-section h2 {
    font-size: 20px; color: #2C3E50; margin-bottom: 12px;
    padding-bottom: 8px; border-bottom: 2px solid #1ABC9C;
    display: flex; align-items: center; gap: 10px;
}
.report-viewer .report-section h2 i { width: 22px; height: 22px; }

/* ==========================================================================
   Indicatori di Stato e Messaggi
   ========================================================================== */
.api-status-indicator {
    margin-top: 15px; padding: 12px; border-radius: 6px;
    font-size: 14px; text-align: center;
    border: 1px solid transparent;
}
.api-status-indicator.success { background-color: #D1F2EB; color: #117A65; border-color: #A3E4D7; }
.api-status-indicator.error { background-color: #FDEBD0; color: #B9770E; border-color: #F5CBA7; } /* Usato per non config. */

.message-container { margin-bottom: 15px; } /* Per messaggi in-page */
.message-banner { /* Stile base per messaggi dinamici */
    padding: 12px 20px; border-radius: 6px; font-size: 15px;
    text-align: center; margin: 0 auto 15px auto; /* Centrato se #dynamicMessageContainer */
}
.message-banner.info { background-color: #AEDFF7; color: #2471A3; border: 1px solid #85C1E9; }
.message-banner.success { background-color: #D4EFDF; color: #1E8449; border: 1px solid #A9DFBF; }
.message-banner.warning { background-color: #FCF3CF; color: #B7950B; border: 1px solid #F7DC6F; }
.message-banner.error { background-color: #FADBD8; color: #C0392B; border: 1px solid #F1948A; }

#dynamicMessageContainer { /* Per messaggi temporanei globali via JS */
    position: fixed; top: 80px; /* Sotto l'header fisso */
    left: 50%; transform: translateX(-50%);
    z-index: 1001; box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    min-width: 300px; max-width: 90%;
}

/* Loading Overlay Globale */
.loading-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(44, 62, 80, 0.88); /* Sfondo più scuro */
    display: none; /* Nascosto di default, mostrato da JS */
    flex-direction: column; justify-content: center; align-items: center;
    z-index: 2000; color: white;
}
.loading-overlay .spinner {
    width: 50px; height: 50px; border: 5px solid rgba(255,255,255,0.3);
    border-top-color: #1ABC9C; border-radius: 50%; animation: spin 0.8s linear infinite;
}
.loading-overlay p { margin-top: 20px; font-size: 18px; font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Loading Status inline */
.loading-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background-color: #F8F9F9;
    border-radius: 6px;
    font-size: 14px;
    color: #566573;
}
.loading-status .spin-icon {
    animation: spin 1s linear infinite;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Icone Lucide
   ========================================================================== */
.lucide { /* Stile di default per le icone, se necessario */
    stroke-width: 2;
    vertical-align: middle;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
    .suite-main-content { width: 95%; padding: 15px; }
    .module-content-section, .hero-section, .start-analysis-section, .settings-section, .modules-grid-section {
        padding: 20px;
    }
    .grid-container { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

@media (max-width: 768px) {
    .suite-header { padding: 10px 15px; flex-direction: column; align-items: flex-start;}
    .suite-header .logo { margin-bottom: 10px; }
    .suite-nav { width: 100%; display: flex; overflow-x: auto; padding-bottom: 5px; }
    .suite-nav a.nav-link { margin-left: 0; margin-right: 10px; font-size: 14px; padding: 6px 10px; }
    #dynamicMessageContainer { top: 10px; width: 90%; } /* Più in alto su mobile */

    .module-header h1 { font-size: 20px; }
    .module-header h1 i { width: 24px; height: 24px; }
    .module-header p { font-size: 14px; }
    .btn { font-size: 14px; padding: 9px 18px; }
    .btn-large { padding: 12px 24px; font-size: 15px; }

    .tabs { padding-bottom: 0; } /* Rimuovi padding per scrollbar mobile */
}

@media (max-width: 480px) {
    .hero-section h1 { font-size: 28px; }
    .hero-section p { font-size: 16px; }
    .grid-container { grid-template-columns: 1fr; /* Una colonna su mobile molto piccoli */ }
    .module-card { padding: 20px; }
    .form-group input, .form-group textarea, .form-group select { font-size: 14px; padding: 10px 12px; }
}
/* Stili per i semafori individuali delle API Key in settings.html */
.api-key-statuses h4 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #34495E;
}
.api-key-status-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: #566573;
    border-bottom: 1px solid #ecf0f1;
}
.api-key-status-item:last-child {
    border-bottom: none;
}
.api-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}
.api-dot.pending { background-color: #f39c12; /* Arancione per in attesa/test */ }
.api-dot.valid { background-color: #2ecc71; /* Verde per valido */ }
.api-dot.invalid { background-color: #e74c3c; /* Rosso per non valido/errore */ }

/* Icona spinner per updateApiKeyStatusIndicator */
.api-status-indicator .spin-icon,
.api-key-status-item .spin-icon { /* Assicurati che le icone spin siano visibili */
    display: inline-block;
    animation: spin 1s linear infinite;
    width: 16px; /* Adatta la dimensione se necessario */
    height: 16px;
    margin-right: 5px;
}
.api-status-indicator .spin-icon svg,
.api-key-status-item .spin-icon svg {
    width: 100%;
    height: 100%;
}

/* Se usi Lucide per lo spinner, potrebbe non servire .spin-icon-actual se .spin-icon è direttamente sull'elemento <i> */
.spin-icon-actual {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}
/* ==========================================================================
   Context Analyzer - Stili Originali MVP
   ========================================================================== */

/* Container principale */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Header originale */
.header {
    background-color: #1E293B;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

/* Search Section */
.search-section {
    background-color: #F1F5F9;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.search-form .form-group {
    flex: 1;
}

.search-btn {
    padding: 12px 32px;
    background-color: #1ABC9C;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: #16A085;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
}

/* API Notice */
.api-notice {
    background-color: #FEF3C7;
    border: 1px solid #FCD34D;
    color: #92400E;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Summary Stats */
.summary {
    margin-bottom: 30px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-item {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.stat-label {
    font-size: 14px;
    color: #64748B;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #1E293B;
    line-height: 1;
}

.stat-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0.15;
}

.stat-icon .icon {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}

/* Copy Section - Verde Acqua */
.copy-section {
    background: linear-gradient(135deg, #1ABC9C 0%, #16A085 100%);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    color: white;
    text-align: center;
}

.copy-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.copy-section p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.copy-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 24px;
    margin: 5px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background-color: white;
    color: #16A085;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.copy-btn.copied {
    background-color: white;
    color: #16A085;
}

/* AI Analysis Section */
.ai-analysis {
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.ai-analysis h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1E293B;
}

.bot-container {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    border: 1px solid #E2E8F0;
}

/* Map Container */
.map-container {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.category-header {
    margin-bottom: 15px;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.category-details h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 4px;
}

.category-count {
    font-size: 14px;
    color: #64748B;
}

.category-icon {
    color: #1ABC9C;
    opacity: 0.8;
}

.category-icon .icon {
    width: 32px;
    height: 32px;
}

/* Places List in Category Card */
.places-list {
    margin-top: 15px;
}

.place-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #F1F5F9;
}

.place-item:last-child {
    border-bottom: none;
}

.place-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.place-info p {
    font-size: 12px;
    color: #64748B;
    margin: 0;
}

.place-distance {
    font-size: 13px;
    font-weight: 600;
    color: #1ABC9C;
    white-space: nowrap;
}

.brand-tag {
    display: inline-block;
    background-color: #EF4444;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.place-item-more {
    text-align: center;
    padding: 12px;
    color: #1ABC9C;
    font-weight: 600;
    font-size: 14px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px;
    font-size: 18px;
    color: #64748B;
}

.loading-spinner-css {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(26, 188, 156, 0.3);
    border-radius: 50%;
    border-top-color: #1ABC9C;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background-color: #FEE2E2;
    border: 1px solid #FCA5A5;
    color: #DC2626;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748B;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background-color: #F1F5F9;
    color: #1E293B;
}

.modal-filters {
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    gap: 10px;
}

.modal-filters input,
.modal-filters select {
    flex: 1;
    padding: 10px;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    font-size: 14px;
}

.modal-places-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #E2E8F0;
    text-align: center;
}

.modal-footer p {
    margin: 0;
    color: #64748B;
    font-size: 14px;
}

/* AI Result Styles */
.ai-loading {
    text-align: center;
    padding: 40px;
}

.ai-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(26, 188, 156, 0.3);
    border-radius: 50%;
    border-top-color: #1ABC9C;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

.ai-result-container {
    animation: fadeIn 0.5s ease-out;
}

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

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #E2E8F0;
}

.ai-result-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
}

.ai-timestamp {
    font-size: 12px;
    color: #64748B;
}

.ai-result-wrapper {
    background-color: #F8FAFC;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.ai-result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.ai-error-container {
    text-align: center;
    padding: 40px;
}

.ai-error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.ai-error-content .icon {
    width: 32px;
    height: 32px;
    color: #EF4444;
}

.ai-content {
    line-height: 1.6;
    color: #334155;
}

.ai-content h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1E293B;
    margin: 20px 0 10px;
}

.ai-content h5 {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 15px 0 8px;
}

.ai-content ul {
    margin: 10px 0;
    padding-left: 25px;
}

.ai-content li {
    margin-bottom: 8px;
}

.ai-content strong {
    color: #1E293B;
    font-weight: 600;
}/* Stili specifici per il context analyzer integrato nella suite */
.context-analyzer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Search Section - Full Width */
.search-section {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    width: 100%;
}

.search-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    width: 100%;
}

.search-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.search-form .form-group input {
    width: 100%;
}

.search-btn {
    background: #1ABC9C;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    height: 48px;
    white-space: nowrap;
}

.search-btn:hover {
    background: #16A085;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 188, 156, 0.3);
}

/* Summary Stats - White Cards */
.summary {
    background: #f8f9fa;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.stat-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #1ABC9C;
    margin-bottom: 4px;
}

.stat-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #1ABC9C;
    opacity: 0.2;
}

.stat-icon .icon {
    width: 32px;
    height: 32px;
}

/* Copy Section */
.copy-section {
    background: #F0F9FF;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid #E0F2FE;
}

.copy-section h3 {
    margin: 0 0 8px 0;
    color: #1e40af;
}

.copy-section p {
    margin: 0 0 16px 0;
    color: #64748b;
}

.copy-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.copy-btn {
    background: white;
    color: #1e40af;
    border: 2px solid #1e40af;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background: #1e40af;
    color: white;
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

/* AI Analysis Section */
.ai-analysis {
    background: #FAFAFA;
    padding: 32px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #E5E7EB;
}

.ai-analysis h3 {
    margin: 0 0 8px 0;
    color: #1F2937;
}

.bot-container {
    background: white;
    border-radius: 8px;
    padding: 24px;
    min-height: 200px;
    border: 1px solid #E5E7EB;
}

.ai-placeholder {
    color: #9CA3AF;
}

.ai-loading {
    text-align: center;
    padding: 40px;
}

.ai-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #E5E7EB;
    border-top-color: #1ABC9C;
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* AI Result Styles */
.ai-result-container {
    animation: fadeIn 0.5s ease;
}

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

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E7EB;
}

.ai-result-header h4 {
    margin: 0;
    color: #1F2937;
}

.ai-timestamp {
    font-size: 12px;
    color: #9CA3AF;
}

.ai-result-wrapper {
    line-height: 1.8;
    color: #4B5563;
}

.ai-content {
    margin-bottom: 24px;
}

.ai-main-title {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 24px;
    text-align: center;
}

.ai-section {
    margin-bottom: 24px;
    background: #F9FAFB;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #1ABC9C;
}

.ai-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 12px;
}

.ai-icon {
    width: 32px;
    height: 32px;
    background: #1ABC9C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.ai-paragraph {
    color: #4B5563;
    line-height: 1.8;
}

.ai-bold {
    font-weight: 600;
    color: #1F2937;
}

.ai-metric {
    color: #1ABC9C;
    font-weight: 600;
}

.ai-classification {
    background: #E0F2FE;
    color: #1E40AF;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.ai-recommendations {
    background: #F0FDF4;
    padding: 24px;
    border-radius: 8px;
    margin-top: 20px;
}

.ai-category {
    margin-bottom: 20px;
}

.ai-category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1F2937;
}

.ai-category-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-category-icon[data-lucide="check-circle"] {
    background: #DCFCE7;
    color: #22C55E;
}

.ai-category-icon[data-lucide="x-circle"] {
    background: #FEE2E2;
    color: #EF4444;
}

.ai-category-icon[data-lucide="lightbulb"] {
    background: #FEF3C7;
    color: #F59E0B;
}

.ai-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-list-item {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #4B5563;
}

.ai-list-item:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #1ABC9C;
    font-weight: bold;
}

.ai-result-actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.ai-error-container {
    text-align: center;
    padding: 40px;
}

.ai-error-content {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: #DC2626;
    margin-bottom: 16px;
}

.ai-error-content .icon {
    width: 32px;
    height: 32px;
}

/* Map Container */
.map-container {
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.category-header {
    margin-bottom: 16px;
}

.category-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-details h3 {
    margin: 0 0 4px 0;
    color: #1F2937;
}

.category-count {
    font-size: 14px;
    color: #6B7280;
}

.category-icon {
    width: 48px;
    height: 48px;
    background: #F3F4F6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1ABC9C;
}

.category-icon .icon {
    width: 24px;
    height: 24px;
}

.places-list {
    border-top: 1px solid #E5E7EB;
    padding-top: 16px;
}

.place-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #F3F4F6;
}

.place-item:last-child {
    border-bottom: none;
}

.place-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #1F2937;
}

.place-info p {
    margin: 0;
    font-size: 12px;
    color: #6B7280;
}

.place-distance {
    font-size: 14px;
    font-weight: 600;
    color: #1ABC9C;
}

.brand-tag {
    background: #FEE2E2;
    color: #DC2626;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.place-item-more {
    text-align: center;
    padding: 12px 0;
    color: #1ABC9C;
    font-size: 14px;
    font-weight: 500;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #1F2937;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #F3F4F6;
    color: #1F2937;
}

.modal-filters {
    padding: 16px 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    gap: 12px;
}

.modal-filters input,
.modal-filters select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
}

.modal-places-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
    text-align: center;
    color: #6B7280;
    font-size: 14px;
}

.matched-brand-name {
    font-size: 12px;
    color: #059669;
    font-style: italic;
    display: block;
    margin-top: 2px;
}

.place-subcategory-tag {
    background: #E0E7FF;
    color: #4338CA;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 8px;
}

/* Loading Styles */
.loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #6B7280;
}

.loading-spinner-css {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #E5E7EB;
    border-top-color: #1ABC9C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-left: 10px;
}

/* Error Message */
#errorMessage {
    margin: 20px 0;
}

.error-message {
    background: #FEE2E2;
    color: #DC2626;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
    
    .search-form .form-group {
        width: 100%;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .copy-btn {
        width: 100%;
        margin: 4px 0;
    }
}/* ==========================================================================
   Marketing Description Generator Specific Styles
   ========================================================================== */
.image-upload-section {
    background-color: #F8F9F9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.image-tabs {
    background: #EAECEE;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 4px;
}

.image-tabs .tab-link {
    flex: 1;
    background: transparent;
    color: #566573;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

.image-tabs .tab-link.active {
    background: white;
    color: #1ABC9C;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.upload-area {
    border: 3px dashed #CCD1D1;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #FDFEFE;
}

.upload-area:hover {
    background: #E8F8F5;
    border-color: #1ABC9C;
}

.upload-area.dragover {
    background: #D5F4E6;
    border-color: #16A085;
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 16px;
}

.upload-text {
    color: #2C3E50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-subtext {
    color: #7F8C8D;
    font-size: 14px;
}

.url-input-section {
    background: #FDFEFE;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    padding: 20px;
}

.url-form {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.url-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #CCD1D1;
    border-radius: 6px;
    font-size: 14px;
}

.url-input:focus {
    outline: none;
    border-color: #1ABC9C;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.25);
}

.url-list {
    max-height: 200px;
    overflow-y: auto;
}

.url-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #F8F9F9;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
}

.url-item button {
    background: #E74C3C;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.url-item button:hover {
    background: #C0392B;
}

/* Marketing Description Output Formatting */
.marketing-description-output {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    color: #2C3E50;
}

.marketing-description-output h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2C3E50;
    margin: 20px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #1ABC9C;
}

.marketing-description-output h2 {
    font-size: 20px;
    font-weight: 600;
    color: #34495E;
    margin: 18px 0 12px 0;
}

.marketing-description-output h3 {
    font-size: 18px;
    font-weight: 600;
    color: #34495E;
    margin: 16px 0 10px 0;
}

.marketing-description-output p {
    margin: 12px 0;
    text-align: justify;
}

.marketing-description-output strong {
    color: #2C3E50;
    font-weight: 600;
}

.marketing-description-output ul, .marketing-description-output ol {
    margin: 12px 0;
    padding-left: 30px;
}

.marketing-description-output li {
    margin: 8px 0;
    line-height: 1.7;
}

.marketing-description-output blockquote {
    border-left: 4px solid #1ABC9C;
    padding-left: 20px;
    margin: 16px 0;
    font-style: italic;
    color: #566573;
}

.marketing-description-output code {
    background: #ECF0F1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.marketing-description-output hr {
    border: none;
    border-top: 1px solid #D5DBDB;
    margin: 20px 0;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
/* ==========================================================================
   Marketing Description Output Styles
   ========================================================================== */
.marketing-description-output {
    background-color: #FDFEFE;
    border: 1px solid #D5DBDB;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    line-height: 1.8;
}

.marketing-section-title {
    color: #1ABC9C;
    font-size: 22px;
    font-weight: 700;
    margin-top: 100px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E8F6F3;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.marketing-section-title i {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.marketing-section-title:first-child {
    font-size: 26px;
    color: #2C3E50;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #1ABC9C;
}

.marketing-subsection-title {
    color: #34495E;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 12px;
}

.marketing-paragraph {
    color: #4A5568;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

.marketing-list {
    margin: 15px 0;
    padding-left: 25px;
    list-style: none;
}

.marketing-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: #566573;
    font-size: 15px;
    line-height: 1.6;
}

.marketing-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #1ABC9C;
    font-weight: bold;
    font-size: 18px;
}

.marketing-description-output strong {
    color: #2C3E50;
    font-weight: 600;
}

/* Hover effect sui titoli */
.marketing-section-title:hover {
    color: #16A085;
    transition: color 0.3s ease;
}

.marketing-section-title:hover i {
    color: #16A085;
    transition: color 0.3s ease;
}

.marketing-subsection-title:hover {
    color: #16A085;
    transition: color 0.3s ease;
}

/* Responsive per marketing description */
@media (max-width: 768px) {
    .marketing-description-output {
        padding: 20px;
    }
    
    .marketing-section-title {
        font-size: 20px;
    }
    
    .marketing-section-title:first-child {
        font-size: 22px;
    }
    
    .marketing-section-title i {
        width: 20px;
        height: 20px;
    }
    
    .marketing-subsection-title {
        font-size: 17px;
    }
    
    .marketing-paragraph,
    .marketing-list li {
        font-size: 14px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .marketing-description-output {
        padding: 15px;
    }
    
    .marketing-section-title {
        font-size: 18px;
        gap: 8px;
    }
    
    .marketing-section-title:first-child {
        font-size: 20px;
    }
    
    .marketing-section-title i {
        width: 18px;
        height: 18px;
    }
}
/* Report Page (full_report.html) */
.report-viewer .report-section { margin-bottom: 35px; }
.report-viewer .report-section h2 {
    font-size: 20px; color: #2C3E50; margin-bottom: 12px;
    padding-bottom: 8px; border-bottom: 2px solid #1ABC9C;
    display: flex; align-items: center; gap: 10px;
}
.report-viewer .report-section h2 i { width: 22px; height: 22px; }

/* Report Formatted Content */
.report-formatted-content {
    text-align: left !important; /* Forza allineamento a sinistra */
    line-height: 1.7;
    color: #374151;
}

.report-formatted-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2C3E50;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    text-align: left;
}

.report-formatted-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #34495E;
    margin-top: 1.3em;
    margin-bottom: 0.7em;
    text-align: left;
}

.report-formatted-content h5 {
    font-size: 16px;
    font-weight: 600;
    color: #34495E;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
    text-align: left;
}

.report-formatted-content h6 {
    font-size: 14px;
    font-weight: 600;
    color: #566573;
    margin-top: 1em;
    margin-bottom: 0.5em;
    text-align: left;
}

.report-formatted-content p {
    margin-bottom: 1em;
    text-align: left;
}

.report-formatted-content ul,
.report-formatted-content ol {
    margin-left: 20px;
    margin-bottom: 1em;
    padding-left: 20px;
    text-align: left;
}

.report-formatted-content li {
    margin-bottom: 0.4em;
    line-height: 1.6;
    text-align: left;
}

.report-formatted-content ul li {
    list-style-type: disc;
}

.report-formatted-content ol li {
    list-style-type: decimal;
}

.report-formatted-content strong {
    font-weight: 600;
    color: #2C3E50;
}

.report-formatted-content em {
    font-style: italic;
}

.report-formatted-content code {
    background-color: #F3F4F6;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 0.9em;
    color: #E74C3C;
}

.report-formatted-content pre {
    background-color: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    margin-bottom: 1em;
    text-align: left;
}

.report-formatted-content pre code {
    background-color: transparent;
    padding: 0;
    color: #374151;
}

.report-formatted-content pre.json-content {
    background-color: #FAFBFC;
    font-size: 13px;
    line-height: 1.5;
}

.report-formatted-content hr {
    border: none;
    border-top: 2px solid #E5E7EB;
    margin: 2em 0;
}

.report-formatted-content blockquote {
    border-left: 4px solid #1ABC9C;
    padding-left: 1em;
    margin-left: 0;
    margin-bottom: 1em;
    color: #566573;
    font-style: italic;
}

/* Assicura che tutto il contenuto nel report sia allineato a sinistra */
.report-content-box * {
    text-align: left !important;
}
/* ==========================================================================
   Formaps Integration Styles
   ========================================================================== */
/* Barra indirizzo compatta */
.current-address-bar {
    background-color: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.current-address-bar.compact .address-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.current-address-bar.has-address {
    background-color: #E8F6F3;
    border-color: #A3E4D7;
}

.address-icon {
    width: 18px;
    height: 18px;
    color: #1ABC9C;
    flex-shrink: 0;
}

.address-label {
    font-size: 14px;
    color: #566573;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.address-value {
    flex: 1;
    font-size: 14px;
    color: #7F8C8D;
    font-style: italic;
    padding: 4px 10px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #E5E7EB;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.address-value.has-address {
    color: #2C3E50;
    font-style: normal;
    font-weight: 500;
    border-color: #A3E4D7;
}

/* Pulsanti icona */
.btn-icon {
    background-color: transparent;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-icon:hover {
    background-color: #F3F4F6;
    border-color: #1ABC9C;
}

.btn-icon i {
    width: 18px;
    height: 18px;
    color: #566573;
}

.btn-icon:hover i {
    color: #1ABC9C;
}

.btn-icon.copied {
    background-color: #27AE60;
    border-color: #27AE60;
}

.btn-icon.copied i {
    color: white;
}

/* Controlli compatti */
.formaps-controls.compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.control-group {
    display: flex;
    gap: 8px;
}

.info-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7F8C8D;
    font-size: 13px;
    flex: 1;
}

.info-text i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Container iframe - 100% larghezza */
.iframe-container {
    width: 100%;
    height: calc(100vh - 350px); /* Altezza dinamica */
    min-height: 600px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    background-color: #F8F9FA;
    position: relative;
    margin-bottom: 20px;
}

.iframe-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    z-index: 10;
}

.iframe-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #E5E7EB;
    border-top-color: #1ABC9C;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

#formapsIframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Note section compatta */
.notes-section {
    background-color: #F8F9FA;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.notes-section h3 {
    margin-bottom: 10px;
    color: #2C3E50;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-section h3 i {
    width: 18px;
    height: 18px;
}

.notes-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #CCD1D1;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
    min-height: 80px;
}

.notes-section textarea:focus {
    outline: none;
    border-color: #1ABC9C;
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.25);
}

/* Fullscreen styles */
.iframe-container:fullscreen {
    height: 100vh;
    border-radius: 0;
    border: none;
}

.iframe-container:fullscreen #formapsIframe {
    height: 100vh;
}

/* Override per modulo main content - più spazio */
.module-content-section {
    padding: 15px 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .formaps-controls.compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .info-text {
        font-size: 12px;
    }
    
    .iframe-container {
        height: calc(100vh - 400px);
        min-height: 400px;
    }
    
    .address-content {
        font-size: 13px;
    }
    
    .address-label {
        display: none; /* Nascondi label su mobile */
    }
}

@media (max-width: 480px) {
    .iframe-container {
        height: calc(100vh - 450px);
        min-height: 350px;
    }
    
    .control-group .btn-icon {
        padding: 8px;
    }
    
    .address-value {
        font-size: 13px;
        padding: 4px 8px;
    }
}
/* Aggiungi alla fine del file style.css */
#screenshotBtn.active {
    background-color: #1ABC9C;
    color: white;
}

.notes-section textarea {
    transition: all 0.3s ease;
}

.notes-section textarea:focus {
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.25);
}
/* Screenshot button active state */
#screenshotBtn.active {
    background-color: #1ABC9C;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(26, 188, 156, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(26, 188, 156, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26, 188, 156, 0); }
}
/* Chapters Container */
.chapters-container {
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.chapter-item {
    border-bottom: 1px solid #E5E7EB;
    background: white;
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #F8F9FA;
}

.chapter-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
}

.chapter-toggle {
    transition: transform 0.3s;
    width: 20px;
    height: 20px;
}

.chapter-toggle.expanded {
    transform: rotate(0deg);
}

.chapter-title {
    font-weight: 600;
    color: #1F2937;
}

.chapter-date {
    font-size: 12px;
    color: #6B7280;
    margin-left: auto;
}

.chapter-actions {
    display: flex;
    gap: 4px;
}

.btn-icon-small {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #E5E7EB;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-small:hover {
    background: #F3F4F6;
    border-color: #1ABC9C;
}

.chapter-content {
    padding: 16px;
    background: white;
    animation: slideDown 0.3s ease-out;
}

.chapter-text {
    white-space: pre-wrap;
    line-height: 1.6;
    color: #374151;
}

/* Notes controls */
.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.notes-controls {
    display: flex;
    gap: 8px;
}

/* Manual notes section */
.manual-notes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #E5E7EB;
}

.manual-notes h4 {
    margin-bottom: 10px;
    color: #1F2937;
}

/* Popup styles */
.chapter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.chapter-popup {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.popup-header {
    padding: 20px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.popup-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #F3F4F6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Header Utilities - Pulsante Reset */
.header-utilities {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.btn-icon-header {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
}

.btn-icon-header:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
    color: white;
    transform: scale(1.05);
}

.btn-icon-header:active {
    transform: scale(0.95);
}

/* Tooltip per il pulsante */
.btn-icon-header:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}
/* ==========================================================================
   Global Loader Styles
   ========================================================================== */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-backdrop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.loader-content {
    text-align: center;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.loader-content .spinner {
    margin-bottom: 20px;
}

.loader-content .spin-icon {
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    color: #1ABC9C;
}

.loader-text {
    font-size: 16px;
    font-weight: 500;
    color: white;
}

/* Asset Data Display Styles */
.asset-info-banner {
    background: linear-gradient(135deg, #1ABC9C 0%, #16A085 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(26, 188, 156, 0.3);
}

.asset-info-banner.visible {
    display: flex;
}

.asset-info-banner .asset-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.asset-info-content {
    flex: 1;
}

.asset-info-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.asset-info-details {
    font-size: 14px;
    opacity: 0.9;
}

.asset-info-actions {
    display: flex;
    gap: 8px;
}

.asset-info-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.asset-info-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Responsive
   ========================================================================== */