/* ========== ДОКУМЕНТАЦИЯ ========== */
.documentation {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.documentation__button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #4A5568;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(74, 85, 104, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 9998;
}

.documentation__button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(74, 85, 104, 0.4);
}

.documentation__modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.documentation__modal.open {
    display: flex;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.documentation__header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7fafc;
    border-radius: 12px 12px 0 0;
}

.documentation__title {
    margin: 0;
    font-size: 1.5rem;
    color: #2d3748;
}

.documentation__close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #718096;
    transition: color 0.2s;
}

.documentation__close:hover {
    color: #2d3748;
}

.documentation__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 15px 20px 0;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.documentation__tab {
    padding: 8px 16px;
    border: 1px solid #cbd5e0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    color: #4a5568;
}

.documentation__tab:hover {
    background: #edf2f7;
    border-color: #a0aec0;
}

.documentation__tab.active {
    background: #4A5568;
    border-color: #4A5568;
    color: white;
}

.documentation__content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.6;
}

.documentation__content h3 {
    color: #2d3748;
    margin-top: 0;
    margin-bottom: 15px;
}

.documentation__content h4 {
    color: #4a5568;
    margin: 15px 0 10px;
}

.documentation__content p {
    margin: 10px 0;
    color: #4a5568;
}

.documentation__content ul, 
.documentation__content ol {
    margin: 10px 0;
    padding-left: 25px;
}

.documentation__content li {
    margin: 5px 0;
}

.documentation__footer {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7fafc;
    border-radius: 0 0 12px 12px;
}

.documentation__accept {
    background: #0066CC;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
}

.documentation__accept:hover {
    background: #0052a3;
}

.documentation__version {
    color: #a0aec0;
    font-size: 12px;
}

.loading-doc {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.error-doc {
    text-align: center;
    padding: 40px;
    color: #DC3545;
    background: #f8d7da;
    border-radius: 8px;
    margin: 20px;
}

.error-doc a {
    color: #0066CC;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    border: 2px solid #0066CC;
    border-radius: 6px;
    transition: all 0.2s;
}

.error-doc a:hover {
    background: #0066CC;
    color: white;
}

@media (max-width: 768px) {
    .documentation__modal {
        width: 95%;
        max-height: 90vh;
    }
    
    .documentation__tabs {
        padding: 10px 15px 0;
    }
    
    .documentation__tab {
        padding: 6px 12px;
        font-size: 13px;
    }
}
