/* ─────────────────────────────────────────
   Multidomus AI Report — Frontend Styles
   ─────────────────────────────────────── */

#mdff-ai-report-wrap {
    font-family: Arial, sans-serif;
    max-width: 960px;
    margin: 0 auto;
}

/* ── LOADER ── */
#mdff-ai-loader {
    text-align: center;
    padding: 60px 20px;
}
.mdff-loader-inner {
    display: inline-block;
    background: #fff;
    border: 1px solid #e0e8f0;
    border-radius: 12px;
    padding: 48px 64px;
    box-shadow: 0 4px 24px rgba(31,78,121,.08);
    max-width: 480px;
    width: 100%;
}
.mdff-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid #D6E4F0;
    border-top-color: #1F4E79;
    border-radius: 50%;
    animation: mdff-spin 0.9s linear infinite;
    margin: 0 auto 20px;
}
@keyframes mdff-spin {
    to { transform: rotate(360deg); }
}
.mdff-loader-text {
    font-size: 17px;
    font-weight: bold;
    color: #1F4E79;
    margin: 0 0 6px;
}
.mdff-loader-sub {
    font-size: 13px;
    color: #888;
    margin: 0 0 24px;
}
.mdff-progress-bar {
    height: 6px;
    background: #D6E4F0;
    border-radius: 3px;
    overflow: hidden;
}
.mdff-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1F4E79, #2E86C1);
    border-radius: 3px;
    animation: mdff-progress 90s linear forwards;
}
@keyframes mdff-progress {
    0%   { width: 0%; }
    80%  { width: 85%; }
    100% { width: 90%; }
}

/* ── ERRORE ── */
#mdff-ai-error {
    text-align: center;
    padding: 40px 20px;
}
.mdff-error-box {
    display: inline-block;
    background: #fff5f5;
    border: 1px solid #fcc;
    border-radius: 10px;
    padding: 32px 48px;
    max-width: 480px;
}
.mdff-error-icon { font-size: 32px; display: block; margin-bottom: 12px; }
.mdff-error-msg  { color: #c0392b; margin-bottom: 20px; font-size: 15px; }

/* ── BOTTONI ── */
.mdff-btn {
    background: #1F4E79;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s;
}
.mdff-btn:hover { background: #163d61; }
.mdff-btn-sm { padding: 6px 14px; font-size: 13px; }

/* ── TOOLBAR ── */
.mdff-report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 16px;
    border-bottom: 2px solid #D6E4F0;
    margin-bottom: 24px;
}
.mdff-report-date { font-size: 13px; color: #888; }

/* ── CONTENUTO REPORT (HTML generato da Claude) ── */
#mdff-ai-content h1, #mdff-ai-content h2, #mdff-ai-content h3 {
    color: #1F4E79;
}
#mdff-ai-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
#mdff-ai-content th {
    background: #1F4E79;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-size: 14px;
}
#mdff-ai-content td {
    padding: 9px 14px;
    border-bottom: 1px solid #e8f0f8;
    font-size: 14px;
    vertical-align: top;
}
#mdff-ai-content tr:nth-child(even) td { background: #f7fafd; }
#mdff-ai-content .badge-yes  { background: #d4edda; color: #155724; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
#mdff-ai-content .badge-no   { background: #f8d7da; color: #721c24; border-radius: 4px; padding: 2px 8px; font-size: 12px; }
#mdff-ai-content .badge-cond { background: #fff3cd; color: #856404; border-radius: 4px; padding: 2px 8px; font-size: 12px; }

/* ── STAMPA ── */
@media print {
    .mdff-report-toolbar { display: none !important; }
    #mdff-ai-loader, #mdff-ai-error { display: none !important; }
    #mdff-ai-output { display: block !important; }
}
