/* public/css/style.css - Stili principali */

/* Variabili colori (dal tema Replit) */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

/* Header blu gradiente come su Replit */
.dialogue-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.dialogue-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Box Progetto #1 */
.project-info-box {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.project-info-box .icon-box {
    background-color: #bbdefb;
    padding: 0.5rem;
    border-radius: 50%;
    display: inline-flex;
    margin-right: 1rem;
}

/* Stati dialoghi */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge.pending,
.status-badge.in_review {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.approved {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.rejected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-badge.under_discussion {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Card dialoghi */
.dialogue-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dialogue-card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.dialogue-card h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.dialogue-card h3:hover {
    color: #667eea;
}

.dialogue-content-preview {
    color: #6c757d;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Form dialoghi */
.dialogue-form {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.dialogue-form .form-label {
    font-weight: 600;
    color: #495057;
}

/* Bottoni export */
.export-buttons {
    display: flex;
    gap: 0.5rem;
}

.export-buttons .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Modal custom */
.modal-content {
    border-radius: 12px;
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
}

.dialogue-content-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* Admin comment box */
.admin-comment-box {
    background-color: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.admin-comment-box p {
    color: #1565c0;
    margin: 0;
}

/* Filtri e ricerca */
.search-section {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Login box per non autenticati */
.login-required-box {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    max-width: 500px;
    margin: 2rem auto;
}

.login-required-box i {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1rem;
}

/* ===== NUOVO: Sottomenu hover per Manifesto ===== */
.dropdown-hover {
    position: relative;
}

.dropdown-menu-hover {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 220px;
    padding: 0.5rem 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
    list-style: none;
}

/* Mostra il sottomenu on hover */
.dropdown-hover:hover .dropdown-menu-hover {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* Stili per gli items del sottomenu */
.dropdown-menu-hover .dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1.5rem;
    color: #212529;
    text-decoration: none;
    background-color: transparent;
    border: 0;
    transition: all 0.2s;
    white-space: nowrap;
}

.dropdown-menu-hover .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
    padding-left: 2rem;
}

/* Animazione fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix per navbar scura */
.navbar-dark .dropdown-menu-hover {
    background-color: #fff;
    color: #212529;
}

.navbar-dark .dropdown-menu-hover .dropdown-item {
    color: #212529;
}

.navbar-dark .dropdown-menu-hover .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .dialogue-header h1 {
        font-size: 2rem;
    }
    
    .export-buttons {
        flex-wrap: wrap;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile: sottomenu sempre visibile come parte del menu */
    .dropdown-menu-hover {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        background-color: transparent;
        padding-left: 1rem;
        margin-top: 0.5rem;
    }
    
    .dropdown-menu-hover .dropdown-item {
        color: rgba(255,255,255,.8);
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .dropdown-menu-hover .dropdown-item:hover {
        color: #fff;
        background-color: rgba(255,255,255,.1);
        padding-left: 1rem;
    }
}