/* =======================
   КОНТЕКСТНАЯ СИСТЕМА ПОМОЩИ - СТИЛИ
   ======================= */

/* Стили для кнопки помощи */
.help-button {
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.help-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.help-button .fa-question-circle {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Стили для модального окна помощи */
#helpModal .modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#helpModal .modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
}

#helpModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

#helpModal .modal-header .btn-close:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

#helpModal .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

#helpModal .modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

#helpModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#helpModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#helpModal .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#helpModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Стили для содержимого помощи */
#helpModalBody {
    line-height: 1.6;
    color: #333;
}

#helpModalBody h1,
#helpModalBody h2,
#helpModalBody h3,
#helpModalBody h4,
#helpModalBody h5,
#helpModalBody h6 {
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

#helpModalBody h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

#helpModalBody h2 {
    font-size: 1.5rem;
    color: #007bff;
}

#helpModalBody h3 {
    font-size: 1.3rem;
    color: #495057;
}

#helpModalBody p {
    margin-bottom: 1rem;
}

#helpModalBody ul,
#helpModalBody ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

#helpModalBody li {
    margin-bottom: 0.5rem;
}

#helpModalBody code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #e83e8c;
}

#helpModalBody pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #007bff;
    overflow-x: auto;
    margin: 1rem 0;
}

#helpModalBody pre code {
    background: none;
    padding: 0;
    color: #333;
}

#helpModalBody blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #6c757d;
}

#helpModalBody table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

#helpModalBody th,
#helpModalBody td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
}

#helpModalBody th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

#helpModalBody .alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
    border: 1px solid transparent;
}

#helpModalBody .alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

#helpModalBody .alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

#helpModalBody .alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Стили для футера модального окна */
#helpModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

#helpModal .modal-footer .btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

#helpModal .modal-footer .btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

#helpModal .modal-footer .btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

#helpModal .modal-footer .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

#helpModal .modal-footer .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 768px) {
    #helpModal .modal-dialog {
        margin: 0.5rem;
    }
    
    #helpModal .modal-body {
        padding: 1.5rem;
    }
    
    #helpModal .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #helpModal .modal-footer .btn {
        width: 100%;
    }
    
    .help-button {
        width: 36px;
        height: 36px;
    }
    
    .help-button .fa-question-circle {
        font-size: 1.1rem;
    }
}

/* Анимация появления */
.modal.fade #helpModal {
    transform: scale(0.9) translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show #helpModal {
    transform: scale(1) translateY(0);
    opacity: 1;
}