/* IRIS_FE_UPDATES v1 — modulo aggiornamenti dal professionista */

#iris-fe-updates *,
#iris-fe-updates *::before,
#iris-fe-updates *::after { box-sizing: border-box; }

/* === Banner sticky === */
.iris-fe-banner {
    position: fixed;
    top: 12px; right: 12px;
    z-index: 9000;
    display: flex; align-items: center; gap: 8px;
    background: #0891b2; color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(8,145,178,0.35);
    cursor: pointer;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px; font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: iris-fe-slidein 0.3s ease;
}
.iris-fe-banner:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(8,145,178,0.45); }
.iris-fe-banner[hidden] { display: none !important; }
.iris-fe-banner.iris-fe-has-urgent {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(220,38,38,0.4);
    animation: iris-fe-slidein 0.3s ease, iris-fe-pulse 2.5s infinite 0.3s;
}
.iris-fe-count {
    background: white; color: #0891b2;
    padding: 1px 8px; border-radius: 12px;
    font-weight: 700; min-width: 22px; text-align: center;
}
.iris-fe-banner.iris-fe-has-urgent .iris-fe-count { color: #dc2626; }
@keyframes iris-fe-slidein { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes iris-fe-pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(220,38,38,0.4); }
    50% { box-shadow: 0 4px 22px rgba(220,38,38,0.75); }
}

/* === Drawer === */
.iris-fe-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.4);
    z-index: 9100;
    opacity: 0;
    transition: opacity 0.25s;
}
.iris-fe-drawer-overlay[hidden] { display: none !important; }
.iris-fe-drawer-overlay.open { opacity: 1; }

.iris-fe-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(420px, 100vw);
    background: #fafaf7;
    z-index: 9200;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex; flex-direction: column;
    font-family: system-ui, -apple-system, sans-serif;
}
.iris-fe-drawer[hidden] { display: none !important; }
.iris-fe-drawer.open { transform: translateX(0); }

.iris-fe-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}
.iris-fe-drawer-head h3 {
    margin: 0; color: #1e293b; font-size: 18px; font-weight: 600;
}
.iris-fe-close {
    background: none; border: none;
    cursor: pointer;
    font-size: 28px; color: #64748b;
    width: 36px; height: 36px; line-height: 1;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}
.iris-fe-close:hover { background: #f1f5f9; color: #1e293b; }

.iris-fe-drawer-body {
    flex: 1; overflow-y: auto;
    padding: 14px;
    display: flex; flex-direction: column; gap: 14px;
}
.iris-fe-list { display: flex; flex-direction: column; gap: 8px; }
.iris-fe-empty {
    text-align: center; color: #94a3b8;
    padding: 50px 20px; font-style: italic;
}

/* === List item === */
.iris-fe-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: all 0.2s;
    position: relative;
    font-family: inherit; font-size: 14px;
    color: inherit;
}
.iris-fe-item:hover {
    border-color: #0891b2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.iris-fe-item.unread { background: #f0f9ff; border-color: #93c5fd; }
.iris-fe-item.urgent { border-left: 4px solid #dc2626; }
.iris-fe-item-icon { font-size: 24px; flex-shrink: 0; line-height: 1.2; }
.iris-fe-item-body { flex: 1; min-width: 0; padding-right: 14px; }
.iris-fe-item-title {
    font-weight: 500; color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.4;
    word-break: break-word;
}
.iris-fe-item-meta {
    font-size: 12px; color: #64748b;
    display: flex; align-items: center; gap: 8px;
}
.iris-fe-tag-urgent {
    background: #fef2f2; color: #b91c1c;
    padding: 2px 8px; border-radius: 4px;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.iris-fe-item-dot {
    position: absolute;
    top: 16px; right: 14px;
    width: 8px; height: 8px;
    background: #0891b2;
    border-radius: 50%;
}

.iris-fe-mark-all {
    background: white;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all 0.2s;
}
.iris-fe-mark-all:hover {
    background: #f8fafc; color: #1e293b; border-color: #cbd5e1;
}

/* === Modal urgenti === */
.iris-fe-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9500;
    opacity: 0;
    transition: opacity 0.25s;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    font-family: system-ui, -apple-system, sans-serif;
}
.iris-fe-modal-overlay[hidden] { display: none !important; }
.iris-fe-modal-overlay.open { opacity: 1; }

.iris-fe-modal {
    background: white;
    border-radius: 16px;
    padding: 28px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    transform: scale(0.95);
    transition: transform 0.25s;
}
.iris-fe-modal-overlay.open .iris-fe-modal { transform: scale(1); }
.iris-fe-modal-title {
    margin: 0 0 20px; color: #b91c1c;
    font-size: 22px; font-weight: 700;
}
.iris-fe-modal-list {
    display: flex; flex-direction: column; gap: 12px;
}
.iris-fe-modal-item {
    display: flex; align-items: center; gap: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 14px;
}
.iris-fe-modal-icon { font-size: 28px; flex-shrink: 0; }
.iris-fe-modal-body { flex: 1; min-width: 0; }
.iris-fe-modal-body strong {
    display: block; color: #1e293b; line-height: 1.4;
    word-break: break-word;
}
.iris-fe-modal-time { font-size: 12px; color: #64748b; margin-top: 4px; }
.iris-fe-modal-open {
    background: #dc2626; color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s;
    flex-shrink: 0;
}
.iris-fe-modal-open:hover { background: #b91c1c; }
.iris-fe-modal-actions {
    margin-top: 20px;
    display: flex; justify-content: center;
}
.iris-fe-modal-later {
    background: none; border: none;
    color: #64748b;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    text-decoration: underline;
}
.iris-fe-modal-later:hover { color: #1e293b; }

/* === Mobile responsive === */
@media (max-width: 480px) {
    .iris-fe-banner {
        top: auto; bottom: 16px;
        left: 16px; right: 16px;
        justify-content: center;
        font-size: 13px; padding: 12px 14px;
    }
    .iris-fe-drawer { width: 100vw; }
    .iris-fe-modal { padding: 22px; }
    .iris-fe-modal-title { font-size: 19px; }
}