/**
 * Manuale della Casa - Stili CSS
 * Componenti per il sistema di manuale tecnico degli alloggi
 * 
 * @package Blue_Apulia_Child
 */

/* ===== MANUALE CASA - ADMIN ===== */
.ba-manuale-casa-intro {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #00a32a;
}

.ba-categoria-manuale {
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ba-categoria-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.ba-categoria-header h3 {
    margin: 0;
    color: #0073aa;
    font-size: 16px;
}

.ba-categoria-content {
    padding: 20px;
}

.ba-questions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.ba-question-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

.ba-question-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ba-question-text {
    flex: 1;
}

.ba-question-text label {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    display: block;
}

.ba-question-text textarea {
    width: 100%;
    resize: vertical;
    min-height: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ba-question-text textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    outline: none;
}

.ba-question-status {
    flex-shrink: 0;
}

.ba-status-indicator {
    text-align: center;
    padding: 8px;
    border-radius: 4px;
    min-width: 80px;
    transition: all 0.3s ease;
}

.ba-status-indicator.completed {
    background: #d1edff;
    border: 1px solid #007bff;
    animation: pulse-green 2s infinite;
}

.ba-status-indicator.pending {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

@keyframes pulse-green {
    0%, 100% { background-color: #d1edff; }
    50% { background-color: #b8daff; }
}

.ba-manuale-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.ba-category-summary {
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.ba-category-summary.completed {
    background: #d1edff;
}

.ba-category-summary.partial {
    background: #fff3cd;
}

.ba-category-summary.empty {
    background: #f8f9fa;
}

/* ===== MANUALE CASA - FRONTEND ===== */
.ba-manuale-casa-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ba-manuale-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    border-radius: 12px;
    border-left: 4px solid #00a32a;
}

.ba-manuale-header h2 {
    margin: 0 0 10px 0;
    color: #00a32a;
    font-size: 28px;
    font-weight: 700;
}

.ba-manuale-subtitle {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.ba-manuale-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.progress-bar {
    flex: 1;
    max-width: 300px;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.ba-manuale-categoria {
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.ba-manuale-categoria:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.ba-categoria-title {
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 20px;
    color: #0073aa;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.ba-categoria-icon {
    font-size: 24px;
}

.ba-categoria-content {
    padding: 20px;
}

.ba-question-answer {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ba-question-answer:last-child {
    margin-bottom: 0;
}

.ba-question-answer:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.ba-question {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

.ba-answer {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}

.ba-question-empty {
    opacity: 0.6;
}

.ba-answer-empty {
    color: #999;
    font-style: italic;
}

.ba-manuale-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.ba-manuale-empty p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* ===== PULSANTE MANUALE CASA ===== */
.manuale-casa-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    border-radius: 12px;
    border-left: 4px solid #00a32a;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.manuale-casa-section h3 {
    margin: 0 0 15px 0;
    color: #00a32a;
    font-size: 24px;
    font-weight: 700;
}

.manuale-casa-section p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

.btn-manuale-casa {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-manuale-casa:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
    color: white;
    text-decoration: none;
}

.btn-manuale-casa:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .ba-manuale-casa-container {
        padding: 15px;
    }
    
    .ba-manuale-header h2 {
        font-size: 24px;
    }
    
    .ba-categoria-title {
        font-size: 18px;
        padding: 15px;
    }
    
    .ba-categoria-content {
        padding: 15px;
    }
    
    .ba-manuale-progress {
        flex-direction: column;
        gap: 10px;
    }
    
    .progress-bar {
        max-width: 100%;
    }
    
    .ba-question-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .ba-question-status {
        align-self: center;
    }
    
    .manuale-casa-section {
        padding: 15px;
        margin: 20px 0;
    }
    
    .manuale-casa-section h3 {
        font-size: 20px;
    }
    
    .btn-manuale-casa {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .ba-manuale-casa-container {
        padding: 10px;
    }
    
    .ba-manuale-header {
        padding: 15px;
    }
    
    .ba-manuale-header h2 {
        font-size: 20px;
    }
    
    .ba-categoria-title {
        font-size: 16px;
        padding: 12px;
    }
    
    .ba-categoria-content {
        padding: 12px;
    }
    
    .ba-question-answer {
        padding: 12px;
    }
    
    .ba-question {
        font-size: 14px;
    }
    
    .ba-answer {
        font-size: 14px;
    }
}

/* ===== ACCESSIBILITÀ ===== */
@media (prefers-reduced-motion: reduce) {
    .ba-status-indicator.completed {
        animation: none;
    }
    
    .progress-fill,
    .ba-question-item,
    .ba-manuale-categoria,
    .btn-manuale-casa {
        transition: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .ba-manuale-casa-container {
        max-width: none;
        padding: 0;
    }
    
    .ba-manuale-header {
        background: #f8f9fa !important;
        border-left: 4px solid #000 !important;
    }
    
    .ba-manuale-categoria {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .btn-manuale-casa {
        display: none;
    }
    
    .ba-manuale-progress {
        display: none;
    }
}
