/**
 * Help Button Component Styles
 * Sistema di aiuto contestuale con bottone fixed e modal
 * Usa i colori INNOVA Engineering (rosso #b21917)
 */

/* ==================== BOOTSTRAP OVERRIDES - INNOVA COLORS ==================== */

/* Custom button outline using INNOVA red */
.btn-outline-innova {
    color: #b21917;
    border-color: #b21917;
}

.btn-outline-innova:hover {
    color: #fff;
    background-color: #b21917;
    border-color: #b21917;
}

/* Custom background class for INNOVA red */
.bg-innova {
    background-color: #b21917 !important;
}

/* Custom text color for INNOVA red */
.text-innova {
    color: #b21917 !important;
}

/* ==================== HELP BUTTON ==================== */

/* Fixed help button positioning */
.help-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1040; /* Above content, below modals */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border-width: 2px;
    padding: 0.5rem 1rem;
}

.help-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive - smaller button */
@media (max-width: 768px) {
    .help-button {
        bottom: 15px;
        right: 15px;
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }

    .help-button-text {
        display: none; /* Hide text on mobile, show only icon */
    }

    .help-button i {
        margin-right: 0 !important;
    }
}

/* ==================== HELP MODAL ==================== */

/* Modal customizations */
#pageHelpModal .modal-header {
    background: linear-gradient(135deg, #b21917, #901412);
}

#pageHelpModal .modal-body {
    max-height: calc(100vh - 200px);
}

/* Ensure modal is scrollable on mobile */
@media (max-width: 768px) {
    #pageHelpModal .modal-dialog {
        margin: 0.5rem;
    }

    #pageHelpModal .modal-body {
        max-height: calc(100vh - 150px);
    }
}

/* ==================== HELP CONTENT ==================== */

/* Base content styling */
.help-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

/* Typography */
.help-content h1 {
    font-size: 1.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 2px solid #b21917;
    padding-bottom: 0.5rem;
}

.help-content h1:first-child {
    margin-top: 0;
}

.help-content h2 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: #34495e;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.3rem;
}

.help-content h3 {
    font-size: 1.15rem;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
    color: #495057;
}

.help-content p {
    margin-bottom: 1rem;
}

/* Blockquotes */
.help-content blockquote {
    border-left: 4px solid #b21917;
    padding-left: 1rem;
    margin: 1rem 0;
    background-color: #f8f9fa;
    padding: 0.8rem 1rem;
    border-radius: 0.25rem;
}

.help-content blockquote p {
    margin-bottom: 0;
}

/* Code blocks */
.help-content pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.help-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #e83e8c;
    font-family: 'Courier New', monospace;
}

.help-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Tables */
.help-content table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

.help-content table th {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #495057;
}

.help-content table td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
}

.help-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Lists */
.help-content ul,
.help-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.help-content li {
    margin-bottom: 0.5rem;
}

/* Links - INNOVA Red colors */
.help-content a {
    color: #b21917;
    text-decoration: none;
}

.help-content a:hover {
    color: #901412;
    text-decoration: underline;
}

/* Horizontal rules */
.help-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #dee2e6;
}

/* ==================== MOBILE RESPONSIVE ==================== */

@media (max-width: 768px) {
    .help-content {
        font-size: 0.9rem;
    }

    .help-content h1 {
        font-size: 1.4rem;
    }

    .help-content h2 {
        font-size: 1.2rem;
    }

    .help-content table {
        font-size: 0.85rem;
    }

    .help-content table th,
    .help-content table td {
        padding: 0.5rem;
    }
}
